mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge branch 'develop' into improve_credential_manager
# Conflicts: # mRemoteV1/UI/Forms/frmMain.cs # mRemoteV1/UI/Menu/ToolsMenu.cs
This commit is contained in:
@@ -3,6 +3,22 @@
|
||||
Features/Enhancements:
|
||||
----------------------
|
||||
Added more logging/notifications options
|
||||
#429: Added Czech translation
|
||||
|
||||
|
||||
|
||||
|
||||
1.75 hotfix 1 (2017-03-06):
|
||||
|
||||
General Changes:
|
||||
----------------
|
||||
#437: Modify version numbering scheme
|
||||
|
||||
Fixes:
|
||||
------
|
||||
#422: Uncaught exception when clicking in connection tree whitespace
|
||||
#312: Resolved KeePass auto-type issue
|
||||
#427: Export does not respect filtering user/password/domain
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ Robert Siwiec
|
||||
Hayato Iriumi
|
||||
Sebastien Thieury (github.com/SebThieu)
|
||||
Riza Emet
|
||||
Lukas Plachy
|
||||
|
||||
|
||||
Included Source Code
|
||||
@@ -118,3 +119,8 @@ VncSharp 1.1
|
||||
Copyright <20> 2004-2009 David Humphrey
|
||||
GNU General Public License (GPL) Version 2
|
||||
https://github.com/humphd/VncSharp
|
||||
|
||||
ObjectListView 2.9
|
||||
Copyright <20> 2006-2015 Phillip Piper
|
||||
GNU General Public License (GPL) Version 3
|
||||
https://sourceforge.net/projects/objectlistview/
|
||||
@@ -114,22 +114,6 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x86' ">
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>set /p buildenv=<buildenv.tmp
|
||||
|
||||
REM Sign MSI
|
||||
IF EXIST C:\mRemoteNG_code_signing_cert.pfx (
|
||||
IF %25buildenv: Portable=%25==Release (
|
||||
powershell "&""$(SolutionDir)Tools\signfiles.ps1""" %27%25cd%25%27
|
||||
)
|
||||
)
|
||||
|
||||
REM Rename MSI to include version number
|
||||
powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\rename_installer_with_version.ps1" $(SolutionDir)
|
||||
|
||||
REM Copy MSI to Release folder
|
||||
IF %25buildenv: Portable=%25==Release (powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\copy_release_installer.ps1" $(TargetDir) $(SolutionDir)Release)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>REM Clean the TargetDir
|
||||
rmdir /S /Q "$(TargetDir)"
|
||||
@@ -142,4 +126,20 @@ call "$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag
|
||||
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
|
||||
call "$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>set /p buildenv=<buildenv.tmp
|
||||
|
||||
REM Sign MSI
|
||||
IF EXIST C:\mRemoteNG_code_signing_cert.pfx (
|
||||
IF %25buildenv: Portable=%25==Release (
|
||||
powershell -File "$(SolutionDir)Tools\signfiles.ps1" -PathToSignableFiles %25cd%25
|
||||
)
|
||||
)
|
||||
|
||||
REM Rename MSI to include version number
|
||||
powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\rename_installer_with_version.ps1" $(SolutionDir)
|
||||
|
||||
REM Copy MSI to Release folder
|
||||
IF %25buildenv: Portable=%25==Release (powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\copy_release_installer.ps1" $(TargetDir) $(SolutionDir)Release)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
| Update Channel | Build Status | Downloads |
|
||||
| ---------------|--------------|-----------|
|
||||
| Stable | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/master/) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.74) |
|
||||
| Beta | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/beta_channel/) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.75Beta3) |
|
||||
| Stable | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/master/) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.75Hotfix1) |
|
||||
| Beta | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/beta_channel/) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.75Hotfix1) |
|
||||
| Development | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/develop/) | - |
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,31 @@
|
||||
$timeserver = "http://timestamp.verisign.com/scripts/timstamp.dll"
|
||||
$certPath = "C:\mRemoteNG_code_signing_cert.pfx"
|
||||
$certPassword = (Get-Credential -Message "Enter the password for the certificate" -UserName "USERNAME NOT NEEDED").Password
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certPath, $certPassword)
|
||||
$targetPath = $args[0]
|
||||
param(
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# Folder path that contains the files you would like to sign. Recursive.
|
||||
$PathToSignableFiles,
|
||||
|
||||
[string]
|
||||
# The code signing certificate to use when signing the files.
|
||||
$CertificatePath = "C:\mRemoteNG_code_signing_cert.pfx",
|
||||
|
||||
[SecureString]
|
||||
# Password to unlock the code signing certificate.
|
||||
$CertificatePassword = (Get-Credential -Message "Enter password for the mRemoteNG code signing certificate" -UserName "USERNAME NOT NEEDED").Password,
|
||||
|
||||
[string[]]
|
||||
# File names to exclude from signing
|
||||
$Exclude
|
||||
)
|
||||
|
||||
|
||||
Write-Output "Getting files from path: $targetPath"
|
||||
$signableFiles = Get-ChildItem -Path $targetPath -Recurse | ?{$_.Extension -match "dll|exe|msi"}
|
||||
$timeserver = "http://timestamp.verisign.com/scripts/timstamp.dll"
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificatePath, $CertificatePassword)
|
||||
|
||||
|
||||
Write-Output "Getting files from path: $PathToSignableFiles"
|
||||
$signableFiles = Get-ChildItem -Path $PathToSignableFiles -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -notcontains $_.Name}
|
||||
Write-Output "Signable files count: $($signableFiles.Count)"
|
||||
|
||||
foreach ($file in $signableFiles) {
|
||||
Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName
|
||||
}
|
||||
@@ -120,7 +120,7 @@ namespace mRemoteNGTests.Config
|
||||
{
|
||||
var rootNode = new RootNodeInfo(RootNodeType.Connection) {PasswordString = _key.ConvertToUnsecureString()};
|
||||
rootNode.AddChild(connectionInfo);
|
||||
var nodeSerializer = new XmlConnectionNodeSerializer26(_cryptographyProvider, _key);
|
||||
var nodeSerializer = new XmlConnectionNodeSerializer26(_cryptographyProvider, _key, new SaveFilter());
|
||||
var serializer = new XmlConnectionsSerializer(_cryptographyProvider, nodeSerializer);
|
||||
var serializedData = serializer.Serialize(rootNode);
|
||||
return XDocument.Parse(serializedData);
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Credential;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tree;
|
||||
using NSubstitute;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace mRemoteNGTests.Config.Serializers
|
||||
{
|
||||
public class CsvConnectionsSerializerMremotengFormatTests
|
||||
{
|
||||
private const string ConnectionName = "myconnection";
|
||||
private const string Username = "myuser";
|
||||
private const string Domain = "mydomain";
|
||||
private const string Password = "mypass123";
|
||||
|
||||
[TestCase(Username)]
|
||||
[TestCase(Domain)]
|
||||
[TestCase(Password)]
|
||||
[TestCase("InheritColors")]
|
||||
public void CreatesCsv(string valueThatShouldExist)
|
||||
{
|
||||
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter());
|
||||
var connectionInfo = BuildConnectionInfo();
|
||||
var csv = serializer.Serialize(connectionInfo);
|
||||
Assert.That(csv, Does.Match(valueThatShouldExist));
|
||||
}
|
||||
|
||||
[TestCase(Username)]
|
||||
[TestCase(Domain)]
|
||||
[TestCase(Password)]
|
||||
[TestCase("InheritColors")]
|
||||
public void SerializerRespectsSaveFilterSettings(string valueThatShouldntExist)
|
||||
{
|
||||
var saveFilter = new SaveFilter(true);
|
||||
var serializer = new CsvConnectionsSerializerMremotengFormat(saveFilter);
|
||||
var connectionInfo = BuildConnectionInfo();
|
||||
var csv = serializer.Serialize(connectionInfo);
|
||||
Assert.That(csv, Does.Not.Match(valueThatShouldntExist));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CanSerializeEmptyConnectionInfo()
|
||||
{
|
||||
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter());
|
||||
var connectionInfo = new ConnectionInfo();
|
||||
var csv = serializer.Serialize(connectionInfo);
|
||||
Assert.That(csv, Is.Not.Empty);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CantPassNullToConstructor()
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>(() => new CsvConnectionsSerializerMremotengFormat(null));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CantPassNullToSerializeConnectionInfo()
|
||||
{
|
||||
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter());
|
||||
Assert.Throws<ArgumentNullException>(() => serializer.Serialize((ConnectionInfo)null));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CantPassNullToSerializeConnectionTreeModel()
|
||||
{
|
||||
var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter());
|
||||
Assert.Throws<ArgumentNullException>(() => serializer.Serialize((ConnectionTreeModel)null));
|
||||
}
|
||||
|
||||
private ConnectionInfo BuildConnectionInfo()
|
||||
{
|
||||
var credRecord = Substitute.For<ICredentialRecord>();
|
||||
credRecord.Username.Returns(Username);
|
||||
credRecord.Domain.Returns(Domain);
|
||||
credRecord.Password.Returns(Password.ConvertToSecureString());
|
||||
return new ConnectionInfo
|
||||
{
|
||||
Name = ConnectionName,
|
||||
CredentialRecord = credRecord,
|
||||
Inheritance = {Colors = true}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,9 @@ using System.Xml.Linq;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Credential;
|
||||
using mRemoteNG.Security;
|
||||
using NSubstitute;
|
||||
using NUnit.Framework;
|
||||
|
||||
|
||||
@@ -12,13 +14,14 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
public class XmlConnectionNodeSerializer27Tests
|
||||
{
|
||||
private XmlConnectionNodeSerializer27 _connectionNodeSerializer;
|
||||
private ICryptographyProvider _cryptographyProvider;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(
|
||||
_cryptographyProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(
|
||||
BlockCipherEngines.AES, BlockCipherModes.GCM);
|
||||
_connectionNodeSerializer = new XmlConnectionNodeSerializer27(cryptoProvider, "myPassword1".ConvertToSecureString());
|
||||
_connectionNodeSerializer = new XmlConnectionNodeSerializer27(_cryptographyProvider, "myPassword1".ConvertToSecureString(), new SaveFilter());
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -75,6 +78,7 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
Username = "myuser",
|
||||
Domain = "superdomain",
|
||||
Password = "pass",
|
||||
CredentialRecord = Substitute.For<ICredentialRecord>(),
|
||||
Hostname = "somehost",
|
||||
ExtApp = "myextapp",
|
||||
PreExtApp = "preext1",
|
||||
@@ -107,6 +111,7 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
yield return new TestCaseData("RDGatewayPassword", ConnectionInfo);
|
||||
yield return new TestCaseData("VNCProxyUsername", ConnectionInfo);
|
||||
yield return new TestCaseData("VNCProxyPassword", ConnectionInfo);
|
||||
yield return new TestCaseData("CredentialId", ConnectionInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,10 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
{
|
||||
_connectionTreeModel = SetupConnectionTreeModel();
|
||||
_cryptographyProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(_cryptographyProvider, _connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString());
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
_cryptographyProvider,
|
||||
_connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
|
||||
new SaveFilter());
|
||||
_documentCompiler = new XmlConnectionsDocumentCompiler(_cryptographyProvider, connectionNodeSerializer);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,10 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
{
|
||||
var connectionTreeModel = SetupConnectionTreeModel();
|
||||
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(cryptoProvider, connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString());
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
cryptoProvider,
|
||||
connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
|
||||
new SaveFilter());
|
||||
_originalDocument = new XmlConnectionsDocumentCompiler(cryptoProvider, connectionNodeSerializer).CompileDocument(connectionTreeModel, false);
|
||||
_documentEncryptor = new XmlConnectionsDocumentEncryptor(cryptoProvider);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
@@ -16,15 +17,19 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
{
|
||||
private XmlConnectionsSerializer _serializer;
|
||||
private ConnectionTreeModel _connectionTreeModel;
|
||||
private ICryptographyProvider _cryptographyProvider;
|
||||
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_connectionTreeModel = SetupConnectionTreeModel();
|
||||
var encryptor = new AeadCryptographyProvider();
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(encryptor, _connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString());
|
||||
_serializer = new XmlConnectionsSerializer(encryptor, connectionNodeSerializer);
|
||||
_cryptographyProvider = new AeadCryptographyProvider();
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
_cryptographyProvider,
|
||||
_connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
|
||||
new SaveFilter());
|
||||
_serializer = new XmlConnectionsSerializer(_cryptographyProvider, connectionNodeSerializer);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -48,6 +53,26 @@ namespace mRemoteNGTests.Config.Serializers
|
||||
Assert.That(connectionNode, Is.Not.Null);
|
||||
}
|
||||
|
||||
[TestCase("CredentialId", "")]
|
||||
[TestCase("InheritAutomaticResize", "False")]
|
||||
public void SerializerRespectsSaveFilterSettings(string attributeName, string expectedValue)
|
||||
{
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
_cryptographyProvider,
|
||||
_connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
|
||||
new SaveFilter(true));
|
||||
var serializer = new XmlConnectionsSerializer(_cryptographyProvider, connectionNodeSerializer);
|
||||
var connectionInfo = new ConnectionInfo
|
||||
{
|
||||
Name = "myConnection",
|
||||
Inheritance = {AutomaticResize = true}
|
||||
};
|
||||
var serializedConnections = serializer.Serialize(connectionInfo);
|
||||
var xdoc = XDocument.Parse(serializedConnections);
|
||||
var attributeValue = xdoc.Root?.Element("Node")?.Attribute(attributeName)?.Value;
|
||||
Assert.That(attributeValue, Is.EqualTo(expectedValue));
|
||||
}
|
||||
|
||||
private ConnectionTreeModel SetupConnectionTreeModel()
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -22,7 +22,10 @@ namespace mRemoteNGTests.IntegrationTests
|
||||
{
|
||||
_originalModel = SetupConnectionTreeModel();
|
||||
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
|
||||
var nodeSerializer = new XmlConnectionNodeSerializer27(cryptoProvider, _originalModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString());
|
||||
var nodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
cryptoProvider,
|
||||
_originalModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
|
||||
new SaveFilter());
|
||||
_serializer = new XmlConnectionsSerializer(cryptoProvider, nodeSerializer);
|
||||
}
|
||||
|
||||
@@ -73,7 +76,10 @@ namespace mRemoteNGTests.IntegrationTests
|
||||
{
|
||||
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
|
||||
cryptoProvider.KeyDerivationIterations = 5000;
|
||||
var nodeSerializer = new XmlConnectionNodeSerializer27(cryptoProvider, _originalModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString());
|
||||
var nodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
cryptoProvider,
|
||||
_originalModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
|
||||
new SaveFilter());
|
||||
_serializer = new XmlConnectionsSerializer(cryptoProvider, nodeSerializer);
|
||||
var serializedContent = _serializer.Serialize(_originalModel);
|
||||
_deserializer = new XmlConnectionsDeserializer(serializedContent, new ICredentialRecord[0]);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace mRemoteNGTests.UI.Controls
|
||||
var textBox = new SecureTextBoxTester(_testForm.secureTextBox1.Name);
|
||||
const string textToSend = "abc123";
|
||||
textBox.Properties.Text = textToSend;
|
||||
Assert.That(textBox.Properties.SecureString.ConvertToUnsecureString(), Is.EqualTo(textToSend));
|
||||
Assert.That(textBox.Properties.SecString.ConvertToUnsecureString(), Is.EqualTo(textToSend));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using mRemoteNG.UI;
|
||||
using NUnit.Framework;
|
||||
using mRemoteNG.UI.Window;
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\mRemoteV1\References\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NSubstitute, Version=1.10.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NSubstitute.1.10.0.0\lib\net45\NSubstitute.dll</HintPath>
|
||||
<Reference Include="NSubstitute, Version=2.0.2.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NSubstitute.2.0.2\lib\net45\NSubstitute.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NUnitForms">
|
||||
@@ -113,6 +113,7 @@
|
||||
<Compile Include="Config\CredentialHarvesterTests.cs" />
|
||||
<Compile Include="Config\Serializers\ConfConsEnsureConnectionsHaveIdsTests.cs" />
|
||||
<Compile Include="Config\Serializers\CredentialProviderSerializerTests.cs" />
|
||||
<Compile Include="Config\Serializers\CsvConnectionsSerializerMremotengFormatTests.cs" />
|
||||
<Compile Include="Config\Serializers\DataTableSerializerTests.cs" />
|
||||
<Compile Include="Config\Serializers\PortScanDeserializerTests.cs" />
|
||||
<Compile Include="Config\Serializers\PuttyConnectionManagerDeserializerTests.cs" />
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BouncyCastle" version="1.8.1" targetFramework="net45" />
|
||||
<package id="DockPanelSuite" version="2.10.0" targetFramework="net45" />
|
||||
<package id="DockPanelSuite.ThemeVS2012Light" version="2.10.0" targetFramework="net45" />
|
||||
<package id="NSubstitute" version="1.10.0.0" targetFramework="net45" />
|
||||
<package id="NUnit" version="3.5.0" targetFramework="net45" />
|
||||
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net45" />
|
||||
<package id="BouncyCastle" version="1.8.1" targetFramework="net40" />
|
||||
<package id="DockPanelSuite" version="2.10.0" targetFramework="net40" />
|
||||
<package id="DockPanelSuite.ThemeVS2012Light" version="2.10.0" targetFramework="net40" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net40" />
|
||||
<package id="NSubstitute" version="2.0.2" targetFramework="net40" />
|
||||
<package id="NUnit" version="3.6.1" targetFramework="net40" />
|
||||
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net40" />
|
||||
</packages>
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25123.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26228.4
|
||||
MinimumVisualStudioVersion = 14.0.25420.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteV1", "mRemoteV1\mRemoteV1.csproj", "{4934A491-40BC-4E5B-9166-EA1169A220F6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteNGTests", "mRemoteNGTests\mRemoteNGTests.csproj", "{1453B37F-8621-499E-B0B2-6091F76DC0BB}"
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace mRemoteNG.App
|
||||
{
|
||||
try
|
||||
{
|
||||
var saveSecurity = new SaveFilter();
|
||||
var saveFilter = new SaveFilter();
|
||||
|
||||
using (var exportForm = new ExportForm())
|
||||
{
|
||||
@@ -50,18 +50,19 @@ namespace mRemoteNG.App
|
||||
break;
|
||||
}
|
||||
|
||||
saveSecurity.SaveUsername = exportForm.IncludeUsername;
|
||||
saveSecurity.SavePassword = exportForm.IncludePassword;
|
||||
saveSecurity.SaveDomain = exportForm.IncludeDomain;
|
||||
saveSecurity.SaveInheritance = exportForm.IncludeInheritance;
|
||||
saveFilter.SaveUsername = exportForm.IncludeUsername;
|
||||
saveFilter.SavePassword = exportForm.IncludePassword;
|
||||
saveFilter.SaveDomain = exportForm.IncludeDomain;
|
||||
saveFilter.SaveInheritance = exportForm.IncludeInheritance;
|
||||
saveFilter.SaveCredentialId = exportForm.IncludeAssignedCredential;
|
||||
|
||||
SaveExportFile(exportForm.FileName, exportForm.SaveFormat, saveSecurity, exportTarget);
|
||||
SaveExportFile(exportForm.FileName, exportForm.SaveFormat, saveFilter, exportTarget);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Export.ExportToFile() failed.", ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Export.ExportToFile() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,17 +78,14 @@ namespace mRemoteNG.App
|
||||
var cryptographyProvider = factory.CreateAeadCryptographyProvider(Settings.Default.EncryptionEngine, Settings.Default.EncryptionBlockCipherMode);
|
||||
cryptographyProvider.KeyDerivationIterations = Settings.Default.EncryptionKeyDerivationIterations;
|
||||
var rootNode = exportTarget.GetRootParent() as RootNodeInfo;
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(cryptographyProvider, rootNode?.PasswordString.ConvertToSecureString() ?? new RootNodeInfo(RootNodeType.Connection).PasswordString.ConvertToSecureString());
|
||||
serializer = new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer)
|
||||
{
|
||||
SaveFilter = saveFilter
|
||||
};
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
cryptographyProvider,
|
||||
rootNode?.PasswordString.ConvertToSecureString() ?? new RootNodeInfo(RootNodeType.Connection).PasswordString.ConvertToSecureString(),
|
||||
saveFilter);
|
||||
serializer = new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer);
|
||||
break;
|
||||
case ConnectionsSaver.Format.mRCSV:
|
||||
serializer = new CsvConnectionsSerializerMremotengFormat
|
||||
{
|
||||
SaveFilter = saveFilter
|
||||
};
|
||||
serializer = new CsvConnectionsSerializerMremotengFormat(saveFilter);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(saveFormat), saveFormat, null);
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace mRemoteNG.App
|
||||
{
|
||||
MessageBox.Show(string.Format(Language.strImportFileFailedContent, fileName), Language.strImportFileFailedMainInstruction,
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromFile() failed:1", ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromFile() failed:1", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace mRemoteNG.App
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromFile() failed:2", ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromFile() failed:2", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace mRemoteNG.App
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromActiveDirectory() failed.", ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromActiveDirectory() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,8 +111,7 @@ namespace mRemoteNG.App
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromPortScan() failed.", ex,
|
||||
logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromPortScan() failed.", ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace mRemoteNG.App
|
||||
var logFilePath = Application.StartupPath;
|
||||
#endif
|
||||
var logFileName = Path.ChangeExtension(Application.ProductName, ".log");
|
||||
if (logFileName == null) return "mRemoteNG.log";
|
||||
var logFile = Path.Combine(logFilePath, logFileName);
|
||||
return logFile;
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ namespace mRemoteNG.App
|
||||
internal static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, StringBuilder lParam);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, uint msg, IntPtr wParam, string lParam);
|
||||
internal static extern IntPtr SendMessage(IntPtr hWnd, uint msg, IntPtr wParam, string lParam);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
|
||||
public static extern IntPtr SendMessage([In] IntPtr hWnd, [In] uint msg, [Out] StringBuilder wParam, [In] IntPtr lParam);
|
||||
internal static extern IntPtr SendMessage([In] IntPtr hWnd, [In] uint msg, [Out] StringBuilder wParam, [In] IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||
internal static extern IntPtr SetClipboardViewer(IntPtr hWndNewViewer);
|
||||
|
||||
@@ -22,6 +22,7 @@ using mRemoteNG.Credential;
|
||||
using mRemoteNG.Messages.MessageWriters;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using mRemoteNG.UI;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.Forms.Input;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
|
||||
@@ -272,7 +272,7 @@ namespace mRemoteNG.App.Update
|
||||
throw updateAuthenticode.Exception;
|
||||
}
|
||||
|
||||
throw new Exception(updateAuthenticode.StatusMessage);
|
||||
throw new Exception(updateAuthenticode.GetStatusMessage());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,77 +16,87 @@ namespace mRemoteNG.App
|
||||
private static UltraVNCWindow _ultravncscForm;
|
||||
private static ComponentsCheckWindow _componentscheckForm;
|
||||
|
||||
public static ConnectionTreeWindow TreeForm { get; set; } = new ConnectionTreeWindow();
|
||||
public static ConfigWindow ConfigForm { get; set; } = new ConfigWindow();
|
||||
public static ErrorAndInfoWindow ErrorsForm { get; set; } = new ErrorAndInfoWindow();
|
||||
public static ScreenshotManagerWindow ScreenshotForm { get; set; } = new ScreenshotManagerWindow();
|
||||
public static UpdateWindow UpdateForm { get; set; } = new UpdateWindow();
|
||||
public static SSHTransferWindow SshtransferForm { get; set; }
|
||||
|
||||
|
||||
internal static ConnectionTreeWindow TreeForm { get; set; } = new ConnectionTreeWindow();
|
||||
internal static ConfigWindow ConfigForm { get; set; } = new ConfigWindow();
|
||||
internal static ErrorAndInfoWindow ErrorsForm { get; set; } = new ErrorAndInfoWindow();
|
||||
internal static ScreenshotManagerWindow ScreenshotForm { get; set; } = new ScreenshotManagerWindow();
|
||||
private static UpdateWindow UpdateForm { get; set; } = new UpdateWindow();
|
||||
internal static SSHTransferWindow SshtransferForm { get; private set; } = new SSHTransferWindow();
|
||||
|
||||
|
||||
|
||||
public static void Show(WindowType windowType)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (windowType.Equals(WindowType.About))
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (windowType)
|
||||
{
|
||||
if (_aboutForm == null || _aboutForm.IsDisposed)
|
||||
_aboutForm = new AboutWindow();
|
||||
_aboutForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.ActiveDirectoryImport))
|
||||
{
|
||||
if (_adimportForm == null || _adimportForm.IsDisposed)
|
||||
_adimportForm = new ActiveDirectoryImportWindow();
|
||||
_adimportForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.Options))
|
||||
{
|
||||
using (var optionsForm = new frmOptions())
|
||||
{
|
||||
optionsForm.ShowDialog(FrmMain.Default.pnlDock);
|
||||
}
|
||||
}
|
||||
else if (windowType.Equals(WindowType.SSHTransfer))
|
||||
{
|
||||
SshtransferForm = new SSHTransferWindow();
|
||||
SshtransferForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.Update))
|
||||
{
|
||||
if (UpdateForm == null || UpdateForm.IsDisposed)
|
||||
UpdateForm = new UpdateWindow();
|
||||
UpdateForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.Help))
|
||||
{
|
||||
if (_helpForm == null || _helpForm.IsDisposed)
|
||||
_helpForm = new HelpWindow();
|
||||
_helpForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.ExternalApps))
|
||||
{
|
||||
if (_externalappsForm == null || _externalappsForm.IsDisposed)
|
||||
_externalappsForm = new ExternalToolsWindow();
|
||||
_externalappsForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.PortScan))
|
||||
{
|
||||
_portscanForm = new PortScanWindow();
|
||||
_portscanForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.UltraVNCSC))
|
||||
{
|
||||
if (_ultravncscForm == null || _ultravncscForm.IsDisposed)
|
||||
_ultravncscForm = new UltraVNCWindow();
|
||||
_ultravncscForm.Show(FrmMain.Default.pnlDock);
|
||||
}
|
||||
else if (windowType.Equals(WindowType.ComponentsCheck))
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Showing ComponentsCheck window", true);
|
||||
if (_componentscheckForm == null || _componentscheckForm.IsDisposed)
|
||||
_componentscheckForm = new ComponentsCheckWindow();
|
||||
_componentscheckForm.Show(FrmMain.Default.pnlDock);
|
||||
case WindowType.About:
|
||||
if (_aboutForm == null || _aboutForm.IsDisposed)
|
||||
_aboutForm = new AboutWindow();
|
||||
_aboutForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.ActiveDirectoryImport:
|
||||
if (_adimportForm == null || _adimportForm.IsDisposed)
|
||||
_adimportForm = new ActiveDirectoryImportWindow();
|
||||
_adimportForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.Options:
|
||||
using (var optionsForm = new frmOptions())
|
||||
{
|
||||
optionsForm.ShowDialog(FrmMain.Default.pnlDock);
|
||||
}
|
||||
break;
|
||||
case WindowType.SSHTransfer:
|
||||
if (SshtransferForm == null || SshtransferForm.IsDisposed)
|
||||
SshtransferForm = new SSHTransferWindow();
|
||||
SshtransferForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.Update:
|
||||
if (UpdateForm == null || UpdateForm.IsDisposed)
|
||||
UpdateForm = new UpdateWindow();
|
||||
UpdateForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.Help:
|
||||
if (_helpForm == null || _helpForm.IsDisposed)
|
||||
_helpForm = new HelpWindow();
|
||||
_helpForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.ExternalApps:
|
||||
if (_externalappsForm == null || _externalappsForm.IsDisposed)
|
||||
_externalappsForm = new ExternalToolsWindow();
|
||||
_externalappsForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.PortScan:
|
||||
_portscanForm = new PortScanWindow();
|
||||
_portscanForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.UltraVNCSC:
|
||||
if (_ultravncscForm == null || _ultravncscForm.IsDisposed)
|
||||
_ultravncscForm = new UltraVNCWindow();
|
||||
_ultravncscForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
case WindowType.ComponentsCheck:
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Showing ComponentsCheck window", true);
|
||||
if (_componentscheckForm == null || _componentscheckForm.IsDisposed)
|
||||
_componentscheckForm = new ComponentsCheckWindow();
|
||||
_componentscheckForm.Show(FrmMain.Default.pnlDock);
|
||||
break;
|
||||
/*
|
||||
case WindowType.Tree:
|
||||
break;
|
||||
case WindowType.Connection:
|
||||
break;
|
||||
case WindowType.Config:
|
||||
break;
|
||||
case WindowType.ErrorsAndInfos:
|
||||
break;
|
||||
case WindowType.ScreenshotManager:
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(windowType), windowType, null);
|
||||
*/
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -243,10 +243,12 @@ namespace mRemoteNG.Config.Connections
|
||||
var factory = new CryptographyProviderFactory();
|
||||
var cryptographyProvider = factory.CreateAeadCryptographyProvider(mRemoteNG.Settings.Default.EncryptionEngine, mRemoteNG.Settings.Default.EncryptionBlockCipherMode);
|
||||
cryptographyProvider.KeyDerivationIterations = mRemoteNG.Settings.Default.EncryptionKeyDerivationIterations;
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(cryptographyProvider, ConnectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString());
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
cryptographyProvider,
|
||||
ConnectionTreeModel.RootNodes.OfType<RootNodeInfo>().First().PasswordString.ConvertToSecureString(),
|
||||
SaveFilter);
|
||||
var xmlConnectionsSerializer = new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer)
|
||||
{
|
||||
SaveFilter = SaveFilter,
|
||||
UseFullEncryption = mRemoteNG.Settings.Default.EncryptCompleteConnectionsFile
|
||||
};
|
||||
var xml = xmlConnectionsSerializer.Serialize(ConnectionTreeModel);
|
||||
@@ -262,7 +264,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
private void SaveToMremotengFormattedCsv()
|
||||
{
|
||||
var csvConnectionsSerializer = new CsvConnectionsSerializerMremotengFormat { SaveFilter = SaveFilter };
|
||||
var csvConnectionsSerializer = new CsvConnectionsSerializerMremotengFormat(SaveFilter);
|
||||
var dataProvider = new FileDataProvider(ConnectionFileName);
|
||||
var csvContent = csvConnectionsSerializer.Serialize(ConnectionTreeModel);
|
||||
dataProvider.Save(csvContent);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace mRemoteNG.Config.Import
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.Import() failed.", ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.Import() failed.", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace mRemoteNG.Config.Putty
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("PuttySessions.Watcher.StartWatching() failed.", ex, MessageClass.WarningMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("PuttySessions.Watcher.StartWatching() failed.", ex, MessageClass.WarningMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace mRemoteNG.Config.Putty
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("XmingPortablePuttySessions.Watcher.StartWatching() failed.", ex, MessageClass.WarningMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("XmingPortablePuttySessions.Watcher.StartWatching() failed.", ex, MessageClass.WarningMsg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ namespace mRemoteNG.Config.Putty
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("PuttyConfFileReader.LoadConfiguration() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("PuttyConfFileReader.LoadConfiguration() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ namespace mRemoteNG.Config.Putty
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("SessionFileReader.LoadSessionInfo() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("SessionFileReader.LoadSessionInfo() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,16 +14,17 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
private readonly ICryptographyProvider _cryptographyProvider;
|
||||
private readonly SecureString _encryptionKey;
|
||||
private readonly SaveFilter _saveFilter = new SaveFilter();
|
||||
|
||||
public XmlConnectionNodeSerializer26(ICryptographyProvider cryptographyProvider, SecureString encryptionKey)
|
||||
{
|
||||
_cryptographyProvider = cryptographyProvider;
|
||||
_encryptionKey = encryptionKey;
|
||||
}
|
||||
private readonly SaveFilter _saveFilter;
|
||||
|
||||
public XmlConnectionNodeSerializer26(ICryptographyProvider cryptographyProvider, SecureString encryptionKey, SaveFilter saveFilter)
|
||||
{
|
||||
if (cryptographyProvider == null)
|
||||
throw new ArgumentNullException(nameof(cryptographyProvider));
|
||||
if (encryptionKey == null)
|
||||
throw new ArgumentNullException(nameof(encryptionKey));
|
||||
if (saveFilter == null)
|
||||
throw new ArgumentNullException(nameof(saveFilter));
|
||||
|
||||
_cryptographyProvider = cryptographyProvider;
|
||||
_encryptionKey = encryptionKey;
|
||||
_saveFilter = saveFilter;
|
||||
|
||||
@@ -11,13 +11,8 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
private readonly ICryptographyProvider _cryptographyProvider;
|
||||
private readonly SecureString _encryptionKey;
|
||||
private readonly SaveFilter _saveFilter = new SaveFilter();
|
||||
private readonly SaveFilter _saveFilter;
|
||||
|
||||
public XmlConnectionNodeSerializer27(ICryptographyProvider cryptographyProvider, SecureString encryptionKey)
|
||||
{
|
||||
_cryptographyProvider = cryptographyProvider;
|
||||
_encryptionKey = encryptionKey;
|
||||
}
|
||||
|
||||
public XmlConnectionNodeSerializer27(ICryptographyProvider cryptographyProvider, SecureString encryptionKey, SaveFilter saveFilter)
|
||||
{
|
||||
@@ -46,7 +41,9 @@ namespace mRemoteNG.Config.Serializers
|
||||
element.Add(new XAttribute("Panel", connectionInfo.Panel));
|
||||
element.Add(new XAttribute("Id", connectionInfo.ConstantID));
|
||||
|
||||
element.Add(new XAttribute("CredentialId", connectionInfo.CredentialRecord?.Id.ToString() ?? ""));
|
||||
element.Add(_saveFilter.SaveCredentialId
|
||||
? new XAttribute("CredentialId", connectionInfo.CredentialRecord?.Id.ToString() ?? "")
|
||||
: new XAttribute("CredentialId", ""));
|
||||
|
||||
element.Add(new XAttribute("Hostname", connectionInfo.Hostname));
|
||||
element.Add(new XAttribute("Protocol", connectionInfo.Protocol));
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
using System.Xml.Linq;
|
||||
using mRemoteNG.Connection;
|
||||
@@ -18,6 +19,11 @@ namespace mRemoteNG.Config.Serializers
|
||||
|
||||
public XmlConnectionsDocumentCompiler(ICryptographyProvider cryptographyProvider, ISerializer<ConnectionInfo, XElement> connectionNodeSerializer)
|
||||
{
|
||||
if (cryptographyProvider == null)
|
||||
throw new ArgumentNullException(nameof(cryptographyProvider));
|
||||
if (connectionNodeSerializer == null)
|
||||
throw new ArgumentNullException(nameof(connectionNodeSerializer));
|
||||
|
||||
_cryptographyProvider = cryptographyProvider;
|
||||
_connectionNodeSerializer = connectionNodeSerializer;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace mRemoteNG.Config.Serializers
|
||||
private readonly ICryptographyProvider _cryptographyProvider;
|
||||
private readonly ISerializer<ConnectionInfo, XElement> _connectionNodeSerializer;
|
||||
|
||||
public SaveFilter SaveFilter { get; set; } = new SaveFilter();
|
||||
public bool UseFullEncryption { get; set; }
|
||||
|
||||
public XmlConnectionsSerializer(ICryptographyProvider cryptographyProvider, ISerializer<ConnectionInfo, XElement> connectionNodeSerializer)
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.", ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,17 +12,30 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
private string _csv = "";
|
||||
private ConnectionInfo _serializationTarget;
|
||||
private readonly SaveFilter _saveFilter;
|
||||
|
||||
public SaveFilter SaveFilter { get; set; }
|
||||
|
||||
public CsvConnectionsSerializerMremotengFormat(SaveFilter saveFilter)
|
||||
{
|
||||
if (saveFilter == null)
|
||||
throw new ArgumentNullException(nameof(saveFilter));
|
||||
_saveFilter = saveFilter;
|
||||
}
|
||||
|
||||
public string Serialize(ConnectionTreeModel connectionTreeModel)
|
||||
{
|
||||
if (connectionTreeModel == null)
|
||||
throw new ArgumentNullException(nameof(connectionTreeModel));
|
||||
|
||||
var rootNode = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo);
|
||||
return Serialize(rootNode);
|
||||
}
|
||||
|
||||
public string Serialize(ConnectionInfo serializationTarget)
|
||||
{
|
||||
if (serializationTarget == null)
|
||||
throw new ArgumentNullException(nameof(serializationTarget));
|
||||
|
||||
_csv = "";
|
||||
_serializationTarget = serializationTarget;
|
||||
WriteCsvHeader();
|
||||
@@ -34,14 +47,14 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
var csvHeader = string.Empty;
|
||||
csvHeader += "Name;Folder;Description;Icon;Panel;";
|
||||
if (SaveFilter.SaveUsername)
|
||||
if (_saveFilter.SaveUsername)
|
||||
csvHeader += "Username;";
|
||||
if (SaveFilter.SavePassword)
|
||||
if (_saveFilter.SavePassword)
|
||||
csvHeader += "Password;";
|
||||
if (SaveFilter.SaveDomain)
|
||||
if (_saveFilter.SaveDomain)
|
||||
csvHeader += "Domain;";
|
||||
csvHeader += "Hostname;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectSmartCards;RedirectSound;RedirectKeys;PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;";
|
||||
if (SaveFilter.SaveInheritance)
|
||||
if (_saveFilter.SaveInheritance)
|
||||
csvHeader += "InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;InheritUseConsoleSession;InheritUseCredSsp;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;InheritRDGatewayPassword;InheritRDGatewayDomain";
|
||||
_csv += csvHeader;
|
||||
}
|
||||
@@ -70,18 +83,64 @@ namespace mRemoteNG.Config.Serializers
|
||||
|
||||
csvLine += con.Name + ";" + GetNodePath(con) + ";" + con.Description + ";" + con.Icon + ";" + con.Panel + ";";
|
||||
|
||||
if (SaveFilter.SaveUsername)
|
||||
csvLine += con.Username + ";";
|
||||
if (_saveFilter.SaveUsername)
|
||||
csvLine += con.CredentialRecord?.Username + ";";
|
||||
|
||||
if (SaveFilter.SavePassword)
|
||||
csvLine += con.Password + ";";
|
||||
if (_saveFilter.SavePassword)
|
||||
csvLine += con.CredentialRecord?.Password.ConvertToUnsecureString() + ";";
|
||||
|
||||
if (SaveFilter.SaveDomain)
|
||||
csvLine += con.Domain + ";";
|
||||
if (_saveFilter.SaveDomain)
|
||||
csvLine += con.CredentialRecord?.Domain + ";";
|
||||
|
||||
csvLine += con.Hostname + ";" + con.Protocol + ";" + con.PuttySession + ";" + Convert.ToString(con.Port) + ";" + Convert.ToString(con.UseConsoleSession) + ";" + Convert.ToString(con.UseCredSsp) + ";" + con.RenderingEngine + ";" + con.ICAEncryptionStrength + ";" + con.RDPAuthenticationLevel + ";" + con.LoadBalanceInfo + ";" + con.Colors + ";" + con.Resolution + ";" + Convert.ToString(con.AutomaticResize) + ";" + Convert.ToString(con.DisplayWallpaper) + ";" + Convert.ToString(con.DisplayThemes) + ";" + Convert.ToString(con.EnableFontSmoothing) + ";" + Convert.ToString(con.EnableDesktopComposition) + ";" + Convert.ToString(con.CacheBitmaps) + ";" + Convert.ToString(con.RedirectDiskDrives) + ";" + Convert.ToString(con.RedirectPorts) + ";" + Convert.ToString(con.RedirectPrinters) + ";" + Convert.ToString(con.RedirectSmartCards) + ";" + con.RedirectSound + ";" + Convert.ToString(con.RedirectKeys) + ";" + con.PreExtApp + ";" + con.PostExtApp + ";" + con.MacAddress + ";" + con.UserField + ";" + con.ExtApp + ";" + con.VNCCompression + ";" + con.VNCEncoding + ";" + con.VNCAuthMode + ";" + con.VNCProxyType + ";" + con.VNCProxyIP + ";" + Convert.ToString(con.VNCProxyPort) + ";" + con.VNCProxyUsername + ";" + con.VNCProxyPassword + ";" + con.VNCColors + ";" + con.VNCSmartSizeMode + ";" + Convert.ToString(con.VNCViewOnly) + ";";
|
||||
csvLine += con.Hostname + ";" +
|
||||
con.Protocol + ";" +
|
||||
con.PuttySession + ";" +
|
||||
Convert.ToString(con.Port) + ";" +
|
||||
Convert.ToString(con.UseConsoleSession) + ";" +
|
||||
Convert.ToString(con.UseCredSsp) + ";" +
|
||||
con.RenderingEngine + ";" +
|
||||
con.ICAEncryptionStrength + ";" +
|
||||
con.RDPAuthenticationLevel + ";" +
|
||||
con.LoadBalanceInfo + ";" +
|
||||
con.Colors + ";" +
|
||||
con.Resolution + ";" +
|
||||
Convert.ToString(con.AutomaticResize) + ";" +
|
||||
Convert.ToString(con.DisplayWallpaper) + ";" +
|
||||
Convert.ToString(con.DisplayThemes) + ";" +
|
||||
Convert.ToString(con.EnableFontSmoothing) + ";" +
|
||||
Convert.ToString(con.EnableDesktopComposition) + ";" +
|
||||
Convert.ToString(con.CacheBitmaps) + ";" +
|
||||
Convert.ToString(con.RedirectDiskDrives) + ";" +
|
||||
Convert.ToString(con.RedirectPorts) + ";" +
|
||||
Convert.ToString(con.RedirectPrinters) + ";" +
|
||||
Convert.ToString(con.RedirectSmartCards) + ";" +
|
||||
con.RedirectSound + ";" +
|
||||
Convert.ToString(con.RedirectKeys) + ";" +
|
||||
con.PreExtApp + ";" +
|
||||
con.PostExtApp + ";" +
|
||||
con.MacAddress + ";" +
|
||||
con.UserField + ";" +
|
||||
con.ExtApp + ";" +
|
||||
con.VNCCompression + ";" +
|
||||
con.VNCEncoding + ";" +
|
||||
con.VNCAuthMode + ";" +
|
||||
con.VNCProxyType + ";" +
|
||||
con.VNCProxyIP + ";" +
|
||||
Convert.ToString(con.VNCProxyPort) + ";" +
|
||||
con.VNCProxyUsername + ";" +
|
||||
con.VNCProxyPassword + ";" +
|
||||
con.VNCColors + ";" +
|
||||
con.VNCSmartSizeMode + ";" +
|
||||
Convert.ToString(con.VNCViewOnly) + ";" +
|
||||
con.RDGatewayUsageMethod + ";" +
|
||||
con.RDGatewayHostname + ";" +
|
||||
con.RDGatewayUseConnectionCredentials + ";" +
|
||||
con.RDGatewayUsername + ";" +
|
||||
con.RDGatewayPassword + ";" +
|
||||
con.RDGatewayDomain + ";";
|
||||
|
||||
if (SaveFilter.SaveInheritance)
|
||||
|
||||
if (_saveFilter.SaveInheritance)
|
||||
{
|
||||
csvLine += con.Inheritance.CacheBitmaps + ";" +
|
||||
con.Inheritance.Colors + ";" +
|
||||
@@ -127,7 +186,13 @@ namespace mRemoteNG.Config.Serializers
|
||||
con.Inheritance.VNCProxyPassword + ";" +
|
||||
con.Inheritance.VNCColors + ";" +
|
||||
con.Inheritance.VNCSmartSizeMode + ";" +
|
||||
con.Inheritance.VNCViewOnly;
|
||||
con.Inheritance.VNCViewOnly +
|
||||
con.Inheritance.RDGatewayUsageMethod + ";" +
|
||||
con.Inheritance.RDGatewayHostname + ";" +
|
||||
con.Inheritance.RDGatewayUseConnectionCredentials + ";" +
|
||||
con.Inheritance.RDGatewayUsername + ";" +
|
||||
con.Inheritance.RDGatewayPassword + ";" +
|
||||
con.Inheritance.RDGatewayDomain + ";";
|
||||
}
|
||||
|
||||
_csv += csvLine;
|
||||
@@ -137,6 +202,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
var nodePath = "";
|
||||
var container = connectionInfo.Parent;
|
||||
if (container == null) return nodePath;
|
||||
while (container != _serializationTarget)
|
||||
{
|
||||
container = container.Parent;
|
||||
|
||||
@@ -5,15 +5,9 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
public ProtocolHTTP(RenderingEngine RenderingEngine) : base(RenderingEngine)
|
||||
{
|
||||
}
|
||||
|
||||
public override void NewExtended()
|
||||
{
|
||||
base.NewExtended();
|
||||
|
||||
httpOrS = "http";
|
||||
defaultPort = (int)Defaults.Port;
|
||||
}
|
||||
httpOrS = "http";
|
||||
defaultPort = (int)Defaults.Port;
|
||||
}
|
||||
|
||||
public enum Defaults
|
||||
{
|
||||
|
||||
@@ -5,21 +5,20 @@ using mRemoteNG.Tools;
|
||||
using mRemoteNG.App;
|
||||
using TabPage = Crownwood.Magic.Controls.TabPage;
|
||||
|
||||
//using SHDocVw;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.Http
|
||||
{
|
||||
public class HTTPBase : ProtocolBase
|
||||
{
|
||||
#region Private Properties
|
||||
private Control wBrowser;
|
||||
public string httpOrS;
|
||||
public int defaultPort;
|
||||
protected string httpOrS;
|
||||
protected int defaultPort;
|
||||
private string tabTitle;
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
public HTTPBase(RenderingEngine RenderingEngine)
|
||||
|
||||
protected HTTPBase(RenderingEngine RenderingEngine)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -34,18 +33,12 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
{
|
||||
Control = new WebBrowser();
|
||||
}
|
||||
|
||||
NewExtended();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace(Language.strHttpConnectionFailed, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void NewExtended()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Initialize()
|
||||
{
|
||||
@@ -71,13 +64,16 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
if (GeckoBrowser != null)
|
||||
{
|
||||
GeckoBrowser.DocumentTitleChanged += geckoBrowser_DocumentTitleChanged;
|
||||
//GeckoBrowser.Tab.LastTabRemoved += wBrowser_LastTabRemoved;
|
||||
GeckoBrowser.NSSError += CertEvent.GeckoBrowser_NSSError;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception("Failed to initialize Gecko Rendering Engine.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var objWebBrowser = (WebBrowser)wBrowser;
|
||||
//SHDocVw.WebBrowserClass objAxWebBrowser = (SHDocVw.WebBrowserClass)objWebBrowser.ActiveXInstance;
|
||||
objWebBrowser.ScrollBarsEnabled = true;
|
||||
|
||||
// http://stackoverflow.com/questions/4655662/how-to-ignore-script-errors-in-webbrowser
|
||||
@@ -85,8 +81,6 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
objWebBrowser.Navigated += wBrowser_Navigated;
|
||||
objWebBrowser.DocumentTitleChanged += wBrowser_DocumentTitleChanged;
|
||||
//objWebBrowser.NewWindow3 += wBrowser_NewWindow3;
|
||||
//objAxWebBrowser.NewWindow3 += wBrowser_NewWindow3;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -178,24 +172,6 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
objWebBrowser.Navigated -= wBrowser_Navigated;
|
||||
}
|
||||
|
||||
#if false
|
||||
private void wBrowser_NewWindow3(ref object ppDisp, ref bool Cancel, uint dwFlags, string bstrUrlContext, string bstrUrl)
|
||||
{
|
||||
if ((dwFlags & (long)NWMF.NWMF_OVERRIDEKEY) > 0)
|
||||
{
|
||||
Cancel = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void wBrowser_LastTabRemoved(object sender)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
#endif
|
||||
private void wBrowser_DocumentTitleChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
@@ -301,27 +277,6 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
Gecko = 2
|
||||
}
|
||||
|
||||
#if false
|
||||
private enum NWMF
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
NWMF_UNLOADING = 0x1,
|
||||
NWMF_USERINITED = 0x2,
|
||||
NWMF_FIRST = 0x4,
|
||||
NWMF_OVERRIDEKEY = 0x8,
|
||||
NWMF_SHOWHELP = 0x10,
|
||||
NWMF_HTMLDIALOG = 0x20,
|
||||
NWMF_FROMDIALOGCHILD = 0x40,
|
||||
NWMF_USERREQUESTED = 0x80,
|
||||
NWMF_USERALLOWED = 0x100,
|
||||
NWMF_FORCEWINDOW = 0x10000,
|
||||
NWMF_FORCETAB = 0x20000,
|
||||
NWMF_SUGGESTWINDOW = 0x40000,
|
||||
NWMF_SUGGESTTAB = 0x80000,
|
||||
NWMF_INACTIVETAB = 0x100000
|
||||
// ReSharper restore InconsistentNaming
|
||||
}
|
||||
#endif
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
using Gecko;
|
||||
using Gecko.Events;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
// ReSharper disable RedundantAssignment
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.Http
|
||||
{
|
||||
internal abstract class CertEvent
|
||||
{
|
||||
//Refernce: https://bitbucket.org/geckofx/geckofx-33.0/issues/90/invalid-security-certificate-error-on
|
||||
internal static void GeckoBrowser_NSSError(object sender, GeckoNSSErrorEventArgs e)
|
||||
{
|
||||
/* some messages say "Certificate", some say "certificate"
|
||||
* I'm guessing that this is going to be a localization issue...
|
||||
* Log a message so we can try to find a better solution if problems are reported in the future...
|
||||
*/
|
||||
if (!e.Message.ToLower().Contains("certificate"))
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, $"Unhandled NSSError: {e.Message}");
|
||||
e.Handled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
string[] commandButtons =
|
||||
{
|
||||
Language.strHttpsInsecureAllowOnce, // 0
|
||||
Language.strHttpsInsecureAllowAlways, // 1
|
||||
Language.strHttpsInsecureDontAllow // 2
|
||||
};
|
||||
|
||||
CTaskDialog.ShowTaskDialogBox(null, GeneralAppInfo.ProductName, Language.strHttpsInsecurePromptTitle,
|
||||
string.Format(Language.strHttpsInsecurePrompt, e.Uri.AbsoluteUri), "", "", "", "",
|
||||
string.Join(" | ", commandButtons), ETaskDialogButtons.None, ESysIcons.Question, ESysIcons.Question);
|
||||
|
||||
var allow = false;
|
||||
var temporary = true;
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (CTaskDialog.CommandButtonResult)
|
||||
{
|
||||
case 0:
|
||||
allow = true;
|
||||
temporary = true;
|
||||
break;
|
||||
case 1:
|
||||
allow = true;
|
||||
temporary = false;
|
||||
break;
|
||||
case 2:
|
||||
allow = false;
|
||||
temporary = true; // just to be safe
|
||||
break;
|
||||
}
|
||||
|
||||
if (!allow)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, $"User did not allow navigation to {e.Uri.AbsoluteUri} with an insecure certificate: {e.Message}");
|
||||
return;
|
||||
}
|
||||
|
||||
/* "temporary == false" (aka always) might not work:
|
||||
* https://bitbucket.org/geckofx/geckofx-45.0/issues/152/remembervalidityoverride-doesnt-save-in
|
||||
* However, my testing was successful in Gecko 45.0.22
|
||||
*/
|
||||
CertOverrideService.GetService().RememberValidityOverride(e.Uri, e.Certificate,
|
||||
CertOverride.Mismatch | CertOverride.Time | CertOverride.Untrusted, temporary);
|
||||
|
||||
e.Handled = true;
|
||||
((GeckoWebBrowser)sender).Navigate(e.Uri.AbsoluteUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,14 +5,9 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
public ProtocolHTTPS(RenderingEngine RenderingEngine) : base(RenderingEngine)
|
||||
{
|
||||
}
|
||||
|
||||
public override void NewExtended()
|
||||
{
|
||||
base.NewExtended();
|
||||
httpOrS = "https";
|
||||
defaultPort = (int)Defaults.Port;
|
||||
}
|
||||
httpOrS = "https";
|
||||
defaultPort = (int)Defaults.Port;
|
||||
}
|
||||
|
||||
public enum Defaults
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace mRemoteNG.Messages
|
||||
|
||||
|
||||
public Message()
|
||||
: this(MessageClass.InformationMsg, "", false)
|
||||
: this(MessageClass.InformationMsg, "")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
[assembly: AssemblyVersion("1.76.*")]
|
||||
|
||||
[assembly: AssemblyVersion("1.76.0.*")]
|
||||
[assembly: NeutralResourcesLanguage("en")]
|
||||
22
mRemoteV1/Properties/Settings.Designer.cs
generated
22
mRemoteV1/Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace mRemoteNG {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.0.1.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -1811,16 +1811,6 @@ namespace mRemoteNG {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-" +
|
||||
"TW")]
|
||||
public string SupportedUICultures {
|
||||
get {
|
||||
return ((string)(this["SupportedUICultures"]));
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
@@ -2530,5 +2520,15 @@ namespace mRemoteNG {
|
||||
this["LogToApplicationDirectory"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("cs-CZ,de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-" +
|
||||
"CN,zh-TW")]
|
||||
public string SupportedUICultures {
|
||||
get {
|
||||
return ((string)(this["SupportedUICultures"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,9 +449,6 @@
|
||||
<Setting Name="OverrideUICulture" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="SupportedUICultures" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW</Value>
|
||||
</Setting>
|
||||
<Setting Name="ConDefaultRDGatewayHostname" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
@@ -629,5 +626,8 @@
|
||||
<Setting Name="LogToApplicationDirectory" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="SupportedUICultures" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">cs-CZ,de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
Binary file not shown.
54
mRemoteV1/Resources/Language/Language.Designer.cs
generated
54
mRemoteV1/Resources/Language/Language.Designer.cs
generated
@@ -258,6 +258,15 @@ namespace mRemoteNG {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Assigned Credential.
|
||||
/// </summary>
|
||||
internal static string strAssignedCredential {
|
||||
get {
|
||||
return ResourceManager.GetString("strAssignedCredential", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Automatically get session information.
|
||||
/// </summary>
|
||||
@@ -2190,6 +2199,51 @@ namespace mRemoteNG {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allow Always.
|
||||
/// </summary>
|
||||
internal static string strHttpsInsecureAllowAlways {
|
||||
get {
|
||||
return ResourceManager.GetString("strHttpsInsecureAllowAlways", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allow Once.
|
||||
/// </summary>
|
||||
internal static string strHttpsInsecureAllowOnce {
|
||||
get {
|
||||
return ResourceManager.GetString("strHttpsInsecureAllowOnce", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Don't Allow.
|
||||
/// </summary>
|
||||
internal static string strHttpsInsecureDontAllow {
|
||||
get {
|
||||
return ResourceManager.GetString("strHttpsInsecureDontAllow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allow Insecure Certificate for URL: {0}?.
|
||||
/// </summary>
|
||||
internal static string strHttpsInsecurePrompt {
|
||||
get {
|
||||
return ResourceManager.GetString("strHttpsInsecurePrompt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Allow Insecure Certificate?.
|
||||
/// </summary>
|
||||
internal static string strHttpsInsecurePromptTitle {
|
||||
get {
|
||||
return ResourceManager.GetString("strHttpsInsecurePromptTitle", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ICA.
|
||||
/// </summary>
|
||||
|
||||
2523
mRemoteV1/Resources/Language/Language.cs-CZ.resx
Normal file
2523
mRemoteV1/Resources/Language/Language.cs-CZ.resx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2505,4 +2505,22 @@ mRemoteNG will now quit and begin with the installation.</value>
|
||||
<data name="strLogToAppDir" xml:space="preserve">
|
||||
<value>Log to application directory</value>
|
||||
</data>
|
||||
<data name="strAssignedCredential" xml:space="preserve">
|
||||
<value>Assigned Credential</value>
|
||||
</data>
|
||||
<data name="strHttpsInsecureAllowAlways" xml:space="preserve">
|
||||
<value>Allow Always</value>
|
||||
</data>
|
||||
<data name="strHttpsInsecureAllowOnce" xml:space="preserve">
|
||||
<value>Allow Once</value>
|
||||
</data>
|
||||
<data name="strHttpsInsecureDontAllow" xml:space="preserve">
|
||||
<value>Don't Allow</value>
|
||||
</data>
|
||||
<data name="strHttpsInsecurePrompt" xml:space="preserve">
|
||||
<value>Allow Insecure Certificate for URL: {0}?</value>
|
||||
</data>
|
||||
<data name="strHttpsInsecurePromptTitle" xml:space="preserve">
|
||||
<value>Allow Insecure Certificate?</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
@@ -9,7 +9,8 @@ namespace mRemoteNG.Security
|
||||
SaveUsername = true;
|
||||
SavePassword = true;
|
||||
SaveDomain = true;
|
||||
SaveInheritance = true;
|
||||
SaveCredentialId = true;
|
||||
SaveInheritance = true;
|
||||
}
|
||||
|
||||
public bool SaveUsername { get; set; }
|
||||
@@ -18,6 +19,8 @@ namespace mRemoteNG.Security
|
||||
|
||||
public bool SaveDomain { get; set; }
|
||||
|
||||
public bool SaveCredentialId { get; set; }
|
||||
|
||||
public bool SaveInheritance { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
#if !PORTABLE
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
@@ -79,6 +80,7 @@ namespace mRemoteNG.Tools
|
||||
var windowHandle = DisplayParentForm?.Handle ?? IntPtr.Zero;
|
||||
|
||||
_trustProviderErrorCode = NativeMethods.WinVerifyTrust(windowHandle, NativeMethods.WINTRUST_ACTION_GENERIC_VERIFY_V2, trustDataPointer);
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (_trustProviderErrorCode)
|
||||
{
|
||||
case NativeMethods.TRUST_E_NOSIGNATURE:
|
||||
@@ -139,54 +141,51 @@ namespace mRemoteNG.Tools
|
||||
|
||||
private DisplayContextValue DisplayContext {get; set;}
|
||||
private Form DisplayParentForm {get; set;}
|
||||
internal Exception Exception {get; set;}
|
||||
internal Exception Exception {get; private set;}
|
||||
private string FilePath {get; set;}
|
||||
internal bool RequireThumbprintMatch { get; set;}
|
||||
internal bool RequireThumbprintMatch { get; set;}
|
||||
|
||||
internal StatusValue Status { get; set; }
|
||||
internal StatusValue Status { get; private set; }
|
||||
|
||||
public string StatusMessage
|
||||
{
|
||||
get
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (Status)
|
||||
{
|
||||
case StatusValue.Verified:
|
||||
return "The file was verified successfully.";
|
||||
case StatusValue.FileNotExist:
|
||||
return "The specified file does not exist.";
|
||||
case StatusValue.FileEmpty:
|
||||
return "The specified file is empty.";
|
||||
case StatusValue.NoSignature:
|
||||
return "The specified file is not digitally signed.";
|
||||
case StatusValue.NoThumbprintToMatch:
|
||||
return "A thumbprint match is required but no thumbprint to match against was specified.";
|
||||
case StatusValue.ThumbprintNotMatch:
|
||||
/* (char)0x2260 == the "not equal to" symbol (which I cannot print in here without changing the encoding of the file)
|
||||
* Fancy...
|
||||
*
|
||||
* "<>" is fiarly cryptic for non-programers
|
||||
* So is "!="
|
||||
* "=/=" gets the job done, no?
|
||||
* What about plain old English (or localized value): X is not equal to Y?
|
||||
* :P
|
||||
*/
|
||||
return $"The thumbprint does not match. {_thumbprint} {(char)0x2260} {ThumbprintToMatch}.";
|
||||
case StatusValue.TrustProviderError:
|
||||
var ex = new Win32Exception(_trustProviderErrorCode);
|
||||
return $"The trust provider returned an error. {ex.Message}";
|
||||
case StatusValue.UnhandledException:
|
||||
return $"An unhandled exception occurred. {Exception.Message}";
|
||||
default:
|
||||
return "The status is unknown.";
|
||||
}
|
||||
}
|
||||
}
|
||||
public string GetStatusMessage()
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (Status)
|
||||
{
|
||||
case StatusValue.Verified:
|
||||
return "The file was verified successfully.";
|
||||
case StatusValue.FileNotExist:
|
||||
return "The specified file does not exist.";
|
||||
case StatusValue.FileEmpty:
|
||||
return "The specified file is empty.";
|
||||
case StatusValue.NoSignature:
|
||||
return "The specified file is not digitally signed.";
|
||||
case StatusValue.NoThumbprintToMatch:
|
||||
return "A thumbprint match is required but no thumbprint to match against was specified.";
|
||||
case StatusValue.ThumbprintNotMatch:
|
||||
/* (char)0x2260 == the "not equal to" symbol (which I cannot print in here without changing the encoding of the file)
|
||||
* Fancy...
|
||||
*
|
||||
* "<>" is fiarly cryptic for non-programers
|
||||
* So is "!="
|
||||
* "=/=" gets the job done, no?
|
||||
* What about plain old English (or localized value): X is not equal to Y?
|
||||
* :P
|
||||
*/
|
||||
return $"The thumbprint does not match. {_thumbprint} {(char) 0x2260} {ThumbprintToMatch}.";
|
||||
case StatusValue.TrustProviderError:
|
||||
var ex = new Win32Exception(_trustProviderErrorCode);
|
||||
return $"The trust provider returned an error. {ex.Message}";
|
||||
case StatusValue.UnhandledException:
|
||||
return $"An unhandled exception occurred. {Exception.Message}";
|
||||
default:
|
||||
return "The status is unknown.";
|
||||
}
|
||||
}
|
||||
|
||||
private string _thumbprint;
|
||||
|
||||
internal string ThumbprintToMatch { get; set;}
|
||||
internal string ThumbprintToMatch { get; set;}
|
||||
|
||||
private int _trustProviderErrorCode;
|
||||
|
||||
@@ -293,4 +292,5 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -5,7 +5,6 @@ using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Tree;
|
||||
|
||||
|
||||
@@ -31,7 +30,7 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("frmMain.AddNodeToMenu() failed", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("frmMain.AddNodeToMenu() failed", ex);
|
||||
}
|
||||
return dropDownList;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.IO;
|
||||
using System.Security.AccessControl;
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
@@ -18,36 +17,38 @@ namespace mRemoteNG.Tools
|
||||
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(string.Concat("Software\\Wow6432Node\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
using (var key = Registry.CurrentUser.CreateSubKey(string.Concat("Software\\Wow6432Node\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
{
|
||||
key?.SetValue(appName, value, RegistryValueKind.DWord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(string.Concat("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
using (var key = Registry.CurrentUser.CreateSubKey(string.Concat("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
{
|
||||
key?.SetValue(appName, value, RegistryValueKind.DWord);
|
||||
}
|
||||
}
|
||||
|
||||
#if PORTABLE
|
||||
private static void DeleteBrowserFeatureControlKey(string feature, string appName)
|
||||
{
|
||||
|
||||
if (Environment.Is64BitOperatingSystem)
|
||||
{
|
||||
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(string.Concat("Software\\Wow6432Node\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
using (var key = Registry.CurrentUser.OpenSubKey(string.Concat("Software\\Wow6432Node\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
{
|
||||
key?.DeleteValue(appName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(string.Concat("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
using (var key = Registry.CurrentUser.CreateSubKey(string.Concat("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", feature), RegistryKeyPermissionCheck.ReadWriteSubTree))
|
||||
{
|
||||
key?.DeleteValue(appName);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private static void SetBrowserFeatureControl()
|
||||
{
|
||||
@@ -56,7 +57,7 @@ namespace mRemoteNG.Tools
|
||||
// FeatureControl settings are per-process
|
||||
var fileName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
|
||||
|
||||
// make the control is not running inside Visual Studio Designer
|
||||
// make sure the control is not running inside Visual Studio Designer
|
||||
if (string.Compare(fileName, "devenv.exe", StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(fileName, "XDesProc.exe", StringComparison.OrdinalIgnoreCase) == 0)
|
||||
{
|
||||
return;
|
||||
@@ -89,6 +90,7 @@ namespace mRemoteNG.Tools
|
||||
SetBrowserFeatureControlKey("FEATURE_XMLHTTP", fileName, 1);
|
||||
}
|
||||
|
||||
#if PORTABLE
|
||||
private static void DeleteBrowserFeatureControl()
|
||||
{
|
||||
// http://msdn.microsoft.com/en-us/library/ee330720(v=vs.85).aspx
|
||||
@@ -96,7 +98,7 @@ namespace mRemoteNG.Tools
|
||||
// FeatureControl settings are per-process
|
||||
var fileName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
|
||||
|
||||
// make the control is not running inside Visual Studio Designer
|
||||
// make sure the control is not running inside Visual Studio Designer
|
||||
if (string.Compare(fileName, "devenv.exe", StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(fileName, "XDesProc.exe", StringComparison.OrdinalIgnoreCase) == 0)
|
||||
{
|
||||
return;
|
||||
@@ -128,6 +130,7 @@ namespace mRemoteNG.Tools
|
||||
DeleteBrowserFeatureControlKey("FEATURE_WINDOW_RESTRICTIONS", fileName);
|
||||
DeleteBrowserFeatureControlKey("FEATURE_XMLHTTP", fileName);
|
||||
}
|
||||
#endif
|
||||
|
||||
private static uint GetBrowserEmulationMode()
|
||||
{
|
||||
@@ -136,7 +139,7 @@ namespace mRemoteNG.Tools
|
||||
var browserVersion = 9;
|
||||
// default to IE9.
|
||||
|
||||
using (RegistryKey ieKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Internet Explorer", RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.QueryValues))
|
||||
using (var ieKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Internet Explorer", RegistryKeyPermissionCheck.ReadSubTree, RegistryRights.QueryValues))
|
||||
{
|
||||
if (ieKey != null)
|
||||
{
|
||||
@@ -202,7 +205,7 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("IeBrowserEmulation.Register() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("IeBrowserEmulation.Register() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +219,7 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("IeBrowserEmulation.Unregister() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("IeBrowserEmulation.Unregister() failed.", ex);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
InitializeComponent();
|
||||
SetupConnectionTreeView();
|
||||
UseOverlays = false;
|
||||
}
|
||||
|
||||
#region ConnectionTree Setup
|
||||
|
||||
@@ -116,13 +116,14 @@ namespace mRemoteNG.UI.Controls
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
// CodeAyalysis doesn't like null propagation
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "components")]
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (disposing)
|
||||
components?.Dispose();
|
||||
if (!disposing) return;
|
||||
components?.Dispose();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -59,9 +59,9 @@ namespace mRemoteNG.UI.Controls
|
||||
|
||||
private bool Verify()
|
||||
{
|
||||
return secureTextBox1.SecureString.Length == secureTextBox2.SecureString.Length &&
|
||||
secureTextBox1.SecureString.ConvertToUnsecureString() ==
|
||||
secureTextBox2.SecureString.ConvertToUnsecureString();
|
||||
return secureTextBox1.SecString.Length == secureTextBox2.SecString.Length &&
|
||||
secureTextBox1.SecString.ConvertToUnsecureString() ==
|
||||
secureTextBox2.SecString.ConvertToUnsecureString();
|
||||
}
|
||||
|
||||
private void TogglePasswordMatchIndicator(bool passwordsMatch)
|
||||
@@ -85,7 +85,7 @@ namespace mRemoteNG.UI.Controls
|
||||
if (Verify() && !PasswordsMatch)
|
||||
{
|
||||
PasswordsMatch = true;
|
||||
SecureString = secureTextBox1.SecureString;
|
||||
SecureString = secureTextBox1.SecString;
|
||||
RaiseVerifiedEvent();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -8,6 +8,7 @@ using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
@@ -20,15 +21,10 @@ namespace mRemoteNG.UI.Controls
|
||||
private ContextMenuStrip _mnuQuickConnectProtocol;
|
||||
private QuickConnectComboBox _cmbQuickConnect;
|
||||
private ContextMenuStrip _mnuConnections;
|
||||
private readonly IConnectionInitiator _connectionInitiator;
|
||||
|
||||
|
||||
public QuickConnectToolStrip(IConnectionInitiator connectionInitiator)
|
||||
public QuickConnectToolStrip()
|
||||
{
|
||||
if (connectionInitiator == null)
|
||||
throw new ArgumentNullException(nameof(connectionInitiator));
|
||||
|
||||
_connectionInitiator = connectionInitiator;
|
||||
Initialize();
|
||||
ApplyThemes();
|
||||
PopulateQuickConnectProtocolMenu();
|
||||
@@ -169,7 +165,7 @@ namespace mRemoteNG.UI.Controls
|
||||
return;
|
||||
}
|
||||
_cmbQuickConnect.Add(connectionInfo);
|
||||
_connectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
|
||||
FrmMain.Default._connectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -219,17 +215,19 @@ namespace mRemoteNG.UI.Controls
|
||||
var tag = ((ToolStripMenuItem)sender).Tag as ConnectionInfo;
|
||||
if (tag != null)
|
||||
{
|
||||
_connectionInitiator.OpenConnection(tag);
|
||||
FrmMain.Default._connectionInitiator.OpenConnection(tag);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
// CodeAyalysis doesn't like null propagation
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "components")]
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (disposing)
|
||||
components?.Dispose();
|
||||
if (!disposing) return;
|
||||
components?.Dispose();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
14
mRemoteV1/UI/Controls/SecureTextBox.Designer.cs
generated
14
mRemoteV1/UI/Controls/SecureTextBox.Designer.cs
generated
@@ -11,13 +11,21 @@
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
// CodeAnalysis doesn't like null propagation, and possibly IDisposable auto properties (like SecString).
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "components")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "<SecString>k__BackingField")]
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
try
|
||||
{
|
||||
components.Dispose();
|
||||
if (!disposing) return;
|
||||
components?.Dispose();
|
||||
SecString?.Dispose();
|
||||
}
|
||||
finally
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
public partial class SecureTextBox : TextBox
|
||||
{
|
||||
public SecureString SecureString { get; private set; } = new SecureString();
|
||||
public SecureString SecString { get; private set; } = new SecureString();
|
||||
|
||||
public SecureTextBox()
|
||||
{
|
||||
@@ -17,7 +17,7 @@ namespace mRemoteNG.UI.Controls
|
||||
|
||||
private void SecureTextBox_TextChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
SecureString = Text.ConvertToSecureString();
|
||||
SecString = Text.ConvertToSecureString();
|
||||
}
|
||||
}
|
||||
}
|
||||
19
mRemoteV1/UI/Forms/ExportForm.Designer.cs
generated
19
mRemoteV1/UI/Forms/ExportForm.Designer.cs
generated
@@ -18,6 +18,7 @@ namespace mRemoteNG.UI.Forms
|
||||
this.txtFileName = new System.Windows.Forms.TextBox();
|
||||
this.btnBrowse = new System.Windows.Forms.Button();
|
||||
this.grpProperties = new System.Windows.Forms.GroupBox();
|
||||
this.chkAssignedCredential = new System.Windows.Forms.CheckBox();
|
||||
this.grpFile = new System.Windows.Forms.GroupBox();
|
||||
this.lblFileFormat = new System.Windows.Forms.Label();
|
||||
this.lblFileName = new System.Windows.Forms.Label();
|
||||
@@ -131,6 +132,7 @@ namespace mRemoteNG.UI.Forms
|
||||
//
|
||||
// grpProperties
|
||||
//
|
||||
this.grpProperties.Controls.Add(this.chkAssignedCredential);
|
||||
this.grpProperties.Controls.Add(this.lblUncheckProperties);
|
||||
this.grpProperties.Controls.Add(this.chkInheritance);
|
||||
this.grpProperties.Controls.Add(this.chkUsername);
|
||||
@@ -143,6 +145,18 @@ namespace mRemoteNG.UI.Forms
|
||||
this.grpProperties.TabStop = false;
|
||||
this.grpProperties.Text = "Export Properties";
|
||||
//
|
||||
// chkAssignedCredential
|
||||
//
|
||||
this.chkAssignedCredential.AutoSize = true;
|
||||
this.chkAssignedCredential.Checked = true;
|
||||
this.chkAssignedCredential.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkAssignedCredential.Location = new System.Drawing.Point(143, 32);
|
||||
this.chkAssignedCredential.Name = "chkAssignedCredential";
|
||||
this.chkAssignedCredential.Size = new System.Drawing.Size(119, 17);
|
||||
this.chkAssignedCredential.TabIndex = 5;
|
||||
this.chkAssignedCredential.Text = "Assigned Credential";
|
||||
this.chkAssignedCredential.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpFile
|
||||
//
|
||||
this.grpFile.Controls.Add(this.lblFileFormat);
|
||||
@@ -183,6 +197,7 @@ namespace mRemoteNG.UI.Forms
|
||||
this.cboFileFormat.Name = "cboFileFormat";
|
||||
this.cboFileFormat.Size = new System.Drawing.Size(294, 21);
|
||||
this.cboFileFormat.TabIndex = 4;
|
||||
this.cboFileFormat.SelectedIndexChanged += new System.EventHandler(this.cboFileformat_SelectedIndexChanged);
|
||||
//
|
||||
// grpItems
|
||||
//
|
||||
@@ -299,5 +314,7 @@ namespace mRemoteNG.UI.Forms
|
||||
private System.Windows.Forms.RadioButton rdoExportSelectedFolder;
|
||||
private System.Windows.Forms.RadioButton rdoExportEverything;
|
||||
#endregion
|
||||
}
|
||||
|
||||
private CheckBox chkAssignedCredential;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,20 +47,13 @@ namespace mRemoteNG.UI.Forms
|
||||
{
|
||||
get
|
||||
{
|
||||
if (rdoExportSelectedFolder.Checked)
|
||||
{
|
||||
if (rdoExportSelectedFolder.Checked)
|
||||
return ExportScope.SelectedFolder;
|
||||
}
|
||||
else if (rdoExportSelectedConnection.Checked)
|
||||
{
|
||||
return ExportScope.SelectedConnection;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ExportScope.Everything;
|
||||
}
|
||||
if (rdoExportSelectedConnection.Checked)
|
||||
return ExportScope.SelectedConnection;
|
||||
return ExportScope.Everything;
|
||||
}
|
||||
set
|
||||
set
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
@@ -142,7 +135,13 @@ namespace mRemoteNG.UI.Forms
|
||||
chkDomain.Checked = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IncludeAssignedCredential
|
||||
{
|
||||
get { return chkAssignedCredential.Checked; }
|
||||
set { chkAssignedCredential.Checked = value; }
|
||||
}
|
||||
|
||||
public bool IncludeInheritance
|
||||
{
|
||||
get
|
||||
@@ -160,19 +159,15 @@ namespace mRemoteNG.UI.Forms
|
||||
public ExportForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Runtime.FontOverride(this);
|
||||
|
||||
SelectedFolder = null;
|
||||
SelectedConnection = null;
|
||||
|
||||
btnOK.Enabled = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
#region Event Handlers
|
||||
|
||||
private void ExportForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
cboFileFormat.Items.Clear();
|
||||
@@ -225,6 +220,24 @@ namespace mRemoteNG.UI.Forms
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void cboFileformat_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (SaveFormat == ConnectionsSaver.Format.mRXML)
|
||||
{
|
||||
chkUsername.Enabled = false;
|
||||
chkPassword.Enabled = false;
|
||||
chkDomain.Enabled = false;
|
||||
chkAssignedCredential.Enabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
chkUsername.Enabled = true;
|
||||
chkPassword.Enabled = true;
|
||||
chkDomain.Enabled = true;
|
||||
chkAssignedCredential.Enabled = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void ApplyLanguage()
|
||||
@@ -245,6 +258,7 @@ namespace mRemoteNG.UI.Forms
|
||||
chkUsername.Text = Language.strCheckboxUsername;
|
||||
chkPassword.Text = Language.strCheckboxPassword;
|
||||
chkDomain.Text = Language.strCheckboxDomain;
|
||||
chkAssignedCredential.Text = Language.strAssignedCredential;
|
||||
chkInheritance.Text = Language.strCheckboxInheritance;
|
||||
lblUncheckProperties.Text = Language.strUncheckProperties;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
{
|
||||
MessageBox.Show(Language.strErrorCouldNotLaunchPutty, Application.ProductName,
|
||||
MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
|
||||
Runtime.MessageCollector.AddExceptionMessage(Language.strErrorCouldNotLaunchPutty, ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage(Language.strErrorCouldNotLaunchPutty, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
115
mRemoteV1/UI/Forms/frmMain.Designer.cs
generated
115
mRemoteV1/UI/Forms/frmMain.Designer.cs
generated
@@ -1,3 +1,5 @@
|
||||
using mRemoteNG.UI.Controls;
|
||||
|
||||
namespace mRemoteNG.UI.Forms
|
||||
{
|
||||
public partial class FrmMain : System.Windows.Forms.Form
|
||||
@@ -36,6 +38,12 @@ namespace mRemoteNG.UI.Forms
|
||||
this.mMenSep3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tsContainer = new System.Windows.Forms.ToolStripContainer();
|
||||
this.tmrAutoSave = new System.Windows.Forms.Timer(this.components);
|
||||
this._externalToolsToolStrip = new mRemoteNG.UI.Controls.ExternalToolsToolStrip();
|
||||
this._quickConnectToolStrip = new mRemoteNG.UI.Controls.QuickConnectToolStrip();
|
||||
this.mainFileMenu1 = new mRemoteNG.UI.Menu.MainFileMenu();
|
||||
this.viewMenu1 = new mRemoteNG.UI.Menu.ViewMenu();
|
||||
this.toolsMenu1 = new mRemoteNG.UI.Menu.ToolsMenu();
|
||||
this.helpMenu1 = new mRemoteNG.UI.Menu.HelpMenu();
|
||||
this.msMain.SuspendLayout();
|
||||
this.tsContainer.ContentPanel.SuspendLayout();
|
||||
this.tsContainer.TopToolStripPanel.SuspendLayout();
|
||||
@@ -50,23 +58,48 @@ namespace mRemoteNG.UI.Forms
|
||||
this.pnlDock.DockRightPortion = 230D;
|
||||
this.pnlDock.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingSdi;
|
||||
this.pnlDock.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlDock.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pnlDock.Name = "pnlDock";
|
||||
this.pnlDock.Size = new System.Drawing.Size(966, 449);
|
||||
this.pnlDock.Size = new System.Drawing.Size(1288, 594);
|
||||
this.pnlDock.TabIndex = 13;
|
||||
this.pnlDock.ActiveDocumentChanged += new System.EventHandler(this.pnlDock_ActiveDocumentChanged);
|
||||
//
|
||||
// msMain
|
||||
//
|
||||
this.msMain.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.msMain.GripMargin = new System.Windows.Forms.Padding(0);
|
||||
this.msMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mainFileMenu1,
|
||||
this.viewMenu1,
|
||||
this.toolsMenu1,
|
||||
this.helpMenu1});
|
||||
this.msMain.Location = new System.Drawing.Point(3, 0);
|
||||
this.msMain.Name = "msMain";
|
||||
this.msMain.Padding = new System.Windows.Forms.Padding(2, 2, 0, 2);
|
||||
this.msMain.Size = new System.Drawing.Size(269, 24);
|
||||
this.msMain.Size = new System.Drawing.Size(268, 24);
|
||||
this.msMain.Stretch = false;
|
||||
this.msMain.TabIndex = 16;
|
||||
this.msMain.Text = "Main Toolbar";
|
||||
//
|
||||
// mMenFile
|
||||
//
|
||||
this.mMenFile.Name = "mMenFile";
|
||||
this.mMenFile.Size = new System.Drawing.Size(32, 19);
|
||||
//
|
||||
// mMenView
|
||||
//
|
||||
this.mMenView.Name = "mMenView";
|
||||
this.mMenView.Size = new System.Drawing.Size(32, 19);
|
||||
//
|
||||
// mMenTools
|
||||
//
|
||||
this.mMenTools.Name = "mMenTools";
|
||||
this.mMenTools.Size = new System.Drawing.Size(32, 19);
|
||||
//
|
||||
// mMenInfo
|
||||
//
|
||||
this.mMenInfo.Name = "mMenInfo";
|
||||
this.mMenInfo.Size = new System.Drawing.Size(32, 19);
|
||||
//
|
||||
// mMenSep3
|
||||
//
|
||||
this.mMenSep3.Name = "mMenSep3";
|
||||
@@ -78,16 +111,20 @@ namespace mRemoteNG.UI.Forms
|
||||
// tsContainer.ContentPanel
|
||||
//
|
||||
this.tsContainer.ContentPanel.Controls.Add(this.pnlDock);
|
||||
this.tsContainer.ContentPanel.Size = new System.Drawing.Size(966, 449);
|
||||
this.tsContainer.ContentPanel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tsContainer.ContentPanel.Size = new System.Drawing.Size(1288, 594);
|
||||
this.tsContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tsContainer.Location = new System.Drawing.Point(0, 0);
|
||||
this.tsContainer.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tsContainer.Name = "tsContainer";
|
||||
this.tsContainer.Size = new System.Drawing.Size(966, 523);
|
||||
this.tsContainer.Size = new System.Drawing.Size(1288, 644);
|
||||
this.tsContainer.TabIndex = 17;
|
||||
this.tsContainer.Text = "ToolStripContainer1";
|
||||
//
|
||||
// tsContainer.TopToolStripPanel
|
||||
//
|
||||
this.tsContainer.TopToolStripPanel.Controls.Add(this._externalToolsToolStrip);
|
||||
this.tsContainer.TopToolStripPanel.Controls.Add(this._quickConnectToolStrip);
|
||||
this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain);
|
||||
//
|
||||
// tmrAutoSave
|
||||
@@ -95,14 +132,70 @@ namespace mRemoteNG.UI.Forms
|
||||
this.tmrAutoSave.Interval = 10000;
|
||||
this.tmrAutoSave.Tick += new System.EventHandler(this.tmrAutoSave_Tick);
|
||||
//
|
||||
// frmMain
|
||||
// _externalToolsToolStrip
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this._externalToolsToolStrip.BackColor = System.Drawing.SystemColors.Control;
|
||||
this._externalToolsToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this._externalToolsToolStrip.Location = new System.Drawing.Point(271, 0);
|
||||
this._externalToolsToolStrip.MaximumSize = new System.Drawing.Size(0, 25);
|
||||
this._externalToolsToolStrip.Name = "_externalToolsToolStrip";
|
||||
this._externalToolsToolStrip.Size = new System.Drawing.Size(111, 25);
|
||||
this._externalToolsToolStrip.TabIndex = 17;
|
||||
//
|
||||
// _quickConnectToolStrip
|
||||
//
|
||||
this._quickConnectToolStrip.BackColor = System.Drawing.SystemColors.Control;
|
||||
this._quickConnectToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this._quickConnectToolStrip.Location = new System.Drawing.Point(3, 25);
|
||||
this._quickConnectToolStrip.MaximumSize = new System.Drawing.Size(0, 25);
|
||||
this._quickConnectToolStrip.Name = "_quickConnectToolStrip";
|
||||
this._quickConnectToolStrip.Size = new System.Drawing.Size(364, 25);
|
||||
this._quickConnectToolStrip.TabIndex = 18;
|
||||
//
|
||||
// mainFileMenu1
|
||||
//
|
||||
this.mainFileMenu1.ConnectionInitiator = null;
|
||||
this.mainFileMenu1.Name = "mMenFile";
|
||||
this.mainFileMenu1.Size = new System.Drawing.Size(37, 20);
|
||||
this.mainFileMenu1.Text = "&File";
|
||||
this.mainFileMenu1.TreeWindow = null;
|
||||
this.mainFileMenu1.DropDownOpening += new System.EventHandler(this.mainFileMenu1_DropDownOpening);
|
||||
//
|
||||
// viewMenu1
|
||||
//
|
||||
this.viewMenu1.FullscreenHandler = null;
|
||||
this.viewMenu1.MainForm = null;
|
||||
this.viewMenu1.Name = "mMenView";
|
||||
this.viewMenu1.Size = new System.Drawing.Size(44, 20);
|
||||
this.viewMenu1.Text = "&View";
|
||||
this.viewMenu1.TsExternalTools = null;
|
||||
this.viewMenu1.TsQuickConnect = null;
|
||||
this.viewMenu1.DropDownOpening += new System.EventHandler(this.ViewMenu_Opening);
|
||||
//
|
||||
// toolsMenu1
|
||||
//
|
||||
this.toolsMenu1.CredentialProviderCatalog = null;
|
||||
this.toolsMenu1.MainForm = null;
|
||||
this.toolsMenu1.Name = "mMenTools";
|
||||
this.toolsMenu1.Size = new System.Drawing.Size(47, 20);
|
||||
this.toolsMenu1.Text = "&Tools";
|
||||
//
|
||||
// helpMenu1
|
||||
//
|
||||
this.helpMenu1.Name = "mMenInfo";
|
||||
this.helpMenu1.Size = new System.Drawing.Size(44, 20);
|
||||
this.helpMenu1.Text = "&Help";
|
||||
this.helpMenu1.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal;
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(966, 523);
|
||||
this.ClientSize = new System.Drawing.Size(1288, 644);
|
||||
this.Controls.Add(this.tsContainer);
|
||||
this.Icon = global::mRemoteNG.Resources.mRemote_Icon;
|
||||
this.MainMenuStrip = this.msMain;
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Name = "FrmMain";
|
||||
this.Opacity = 0D;
|
||||
this.Text = "mRemoteNG";
|
||||
@@ -132,5 +225,11 @@ namespace mRemoteNG.UI.Forms
|
||||
internal System.Windows.Forms.Timer tmrAutoSave;
|
||||
internal System.Windows.Forms.ToolStripSeparator mMenSep3;
|
||||
private System.ComponentModel.IContainer components;
|
||||
private Menu.MainFileMenu mainFileMenu1;
|
||||
private Menu.ViewMenu viewMenu1;
|
||||
private Menu.ToolsMenu toolsMenu1;
|
||||
private Menu.HelpMenu helpMenu1;
|
||||
internal mRemoteNG.UI.Controls.QuickConnectToolStrip _quickConnectToolStrip;
|
||||
internal mRemoteNG.UI.Controls.ExternalToolsToolStrip _externalToolsToolStrip;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@ using mRemoteNG.Credential;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Controls;
|
||||
using mRemoteNG.UI.Menu;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using mRemoteNG.UI.Window;
|
||||
using Microsoft.Win32;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
namespace mRemoteNG.UI.Forms
|
||||
@@ -44,9 +44,8 @@ namespace mRemoteNG.UI.Forms
|
||||
private readonly ScreenSelectionSystemMenu _screenSystemMenu;
|
||||
private ConnectionInfo _selectedConnection;
|
||||
internal FullscreenHandler _fullscreen { get; set; }
|
||||
private readonly QuickConnectToolStrip _quickConnectToolStrip;
|
||||
private readonly ExternalToolsToolStrip _externalToolsToolStrip;
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
|
||||
internal readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private readonly string _credentialFilePath = Path.Combine(CredentialsFileInfo.CredentialsPath, CredentialsFileInfo.CredentialsFile);
|
||||
|
||||
|
||||
@@ -57,8 +56,7 @@ namespace mRemoteNG.UI.Forms
|
||||
_fullscreen = new FullscreenHandler(this);
|
||||
pnlDock.Theme = new VS2012LightTheme();
|
||||
_screenSystemMenu = new ScreenSelectionSystemMenu(this);
|
||||
_quickConnectToolStrip = new QuickConnectToolStrip(_connectionInitiator);
|
||||
_externalToolsToolStrip = new ExternalToolsToolStrip();
|
||||
|
||||
}
|
||||
|
||||
static FrmMain()
|
||||
@@ -136,13 +134,7 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
Startup.Instance.InitializeProgram(messageCollector);
|
||||
|
||||
msMain.Items.AddRange(new ToolStripItem[]
|
||||
{
|
||||
new MainFileMenu(Windows.TreeForm, _connectionInitiator),
|
||||
new ViewMenu(_externalToolsToolStrip, _quickConnectToolStrip, _fullscreen, this),
|
||||
new ToolsMenu(this, Runtime.CredentialProviderCatalog),
|
||||
new HelpMenu()
|
||||
});
|
||||
SetMenuDependencies();
|
||||
|
||||
var settingsLoader = new SettingsLoader(this, messageCollector, _quickConnectToolStrip, _externalToolsToolStrip);
|
||||
settingsLoader.LoadSettings();
|
||||
@@ -173,6 +165,20 @@ namespace mRemoteNG.UI.Forms
|
||||
Opacity = 1;
|
||||
}
|
||||
|
||||
private void SetMenuDependencies()
|
||||
{
|
||||
mainFileMenu1.TreeWindow = Windows.TreeForm;
|
||||
mainFileMenu1.ConnectionInitiator = _connectionInitiator;
|
||||
|
||||
viewMenu1.TsExternalTools = _externalToolsToolStrip;
|
||||
viewMenu1.TsQuickConnect = _quickConnectToolStrip;
|
||||
viewMenu1.FullscreenHandler = _fullscreen;
|
||||
viewMenu1.MainForm = this;
|
||||
|
||||
toolsMenu1.MainForm = this;
|
||||
toolsMenu1.CredentialProviderCatalog = Runtime.CredentialProviderCatalog;
|
||||
}
|
||||
|
||||
private void ApplyThemes()
|
||||
{
|
||||
pnlDock.DockBackColor = ThemeManager.ActiveTheme.WindowBackgroundColor;
|
||||
@@ -550,5 +556,15 @@ namespace mRemoteNG.UI.Forms
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void ViewMenu_Opening(object sender, EventArgs e)
|
||||
{
|
||||
viewMenu1.mMenView_DropDownOpening(sender, e);
|
||||
}
|
||||
|
||||
private void mainFileMenu1_DropDownOpening(object sender, EventArgs e)
|
||||
{
|
||||
mainFileMenu1.mMenFile_DropDownOpening(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,24 +118,15 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="msMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>375, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_externalToolsToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_quickConnectToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tsQuickConnect.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>112, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tsExternalTools.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>591, 17</value>
|
||||
</metadata>
|
||||
<metadata name="cMenExtAppsToolbar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>724, 17</value>
|
||||
</metadata>
|
||||
<metadata name="mnuQuickConnectProtocol.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>249, 17</value>
|
||||
</metadata>
|
||||
<metadata name="mnuConnections.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>447, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrAutoSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>891, 17</value>
|
||||
<value>470, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -35,18 +35,11 @@ namespace mRemoteNG.UI.Menu
|
||||
private ToolStripMenuItem _mMenFileImport;
|
||||
private ToolStripMenuItem _mMenReconnectAll;
|
||||
|
||||
private readonly ConnectionTreeWindow _connectionTreeWindow;
|
||||
private readonly IConnectionInitiator _connectionInitiator;
|
||||
public ConnectionTreeWindow TreeWindow { get; set; }
|
||||
public IConnectionInitiator ConnectionInitiator { get; set; }
|
||||
|
||||
public MainFileMenu(ConnectionTreeWindow connectionTreeWindow, IConnectionInitiator connectionInitiator)
|
||||
public MainFileMenu()
|
||||
{
|
||||
if (connectionTreeWindow == null)
|
||||
throw new ArgumentNullException(nameof(connectionTreeWindow));
|
||||
if (connectionInitiator == null)
|
||||
throw new ArgumentNullException(nameof(connectionInitiator));
|
||||
|
||||
_connectionTreeWindow = connectionTreeWindow;
|
||||
_connectionInitiator = connectionInitiator;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
@@ -100,7 +93,7 @@ namespace mRemoteNG.UI.Menu
|
||||
Name = "mMenFile";
|
||||
Size = new System.Drawing.Size(37, 20);
|
||||
Text = Language.strMenuFile;
|
||||
DropDownOpening += mMenFile_DropDownOpening;
|
||||
//DropDownOpening += mMenFile_DropDownOpening;
|
||||
//
|
||||
// mMenFileNewConnection
|
||||
//
|
||||
@@ -263,9 +256,9 @@ namespace mRemoteNG.UI.Menu
|
||||
}
|
||||
|
||||
#region File
|
||||
private void mMenFile_DropDownOpening(object sender, EventArgs e)
|
||||
internal void mMenFile_DropDownOpening(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNodeType = _connectionTreeWindow.SelectedNode?.GetTreeNodeType();
|
||||
var selectedNodeType = TreeWindow.SelectedNode?.GetTreeNodeType();
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (selectedNodeType)
|
||||
{
|
||||
@@ -335,13 +328,13 @@ namespace mRemoteNG.UI.Menu
|
||||
|
||||
private void mMenFileNewConnection_Click(object sender, EventArgs e)
|
||||
{
|
||||
_connectionTreeWindow.ConnectionTree.AddConnection();
|
||||
TreeWindow.ConnectionTree.AddConnection();
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
|
||||
private void mMenFileNewFolder_Click(object sender, EventArgs e)
|
||||
{
|
||||
_connectionTreeWindow.ConnectionTree.AddFolder();
|
||||
TreeWindow.ConnectionTree.AddFolder();
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
|
||||
@@ -387,19 +380,19 @@ namespace mRemoteNG.UI.Menu
|
||||
|
||||
private void mMenFileDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
_connectionTreeWindow.ConnectionTree.DeleteSelectedNode();
|
||||
TreeWindow.ConnectionTree.DeleteSelectedNode();
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
|
||||
private void mMenFileRename_Click(object sender, EventArgs e)
|
||||
{
|
||||
_connectionTreeWindow.ConnectionTree.RenameSelectedNode();
|
||||
TreeWindow.ConnectionTree.RenameSelectedNode();
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
|
||||
private void mMenFileDuplicate_Click(object sender, EventArgs e)
|
||||
{
|
||||
_connectionTreeWindow.ConnectionTree.DuplicateSelectedNode();
|
||||
TreeWindow.ConnectionTree.DuplicateSelectedNode();
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
|
||||
@@ -425,7 +418,7 @@ namespace mRemoteNG.UI.Menu
|
||||
foreach (var i in icList)
|
||||
{
|
||||
i.Protocol.Close();
|
||||
_connectionInitiator.OpenConnection(i.Info, ConnectionInfo.Force.DoNotJump);
|
||||
ConnectionInitiator.OpenConnection(i.Info, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
// throw it on the garbage collector
|
||||
@@ -436,7 +429,7 @@ namespace mRemoteNG.UI.Menu
|
||||
|
||||
private void mMenFileImportFromFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNode = _connectionTreeWindow.SelectedNode;
|
||||
var selectedNode = TreeWindow.SelectedNode;
|
||||
ContainerInfo importDestination;
|
||||
if (selectedNode == null)
|
||||
importDestination = Runtime.ConnectionTreeModel.RootNodes.First();
|
||||
|
||||
@@ -17,13 +17,12 @@ namespace mRemoteNG.UI.Menu
|
||||
private ToolStripMenuItem _mMenToolsUvncsc;
|
||||
private ToolStripMenuItem _mMenToolsComponentsCheck;
|
||||
private ToolStripMenuItem _credentialManagerToolStripMenuItem;
|
||||
private readonly ICredentialRepositoryList _credentialProviderCatalog;
|
||||
private readonly Form _form;
|
||||
|
||||
public ToolsMenu(Form form, ICredentialRepositoryList credentialProviderCatalog)
|
||||
public Form MainForm { get; set; }
|
||||
public ICredentialRepositoryList CredentialProviderCatalog { get; set; }
|
||||
|
||||
public ToolsMenu()
|
||||
{
|
||||
_form = form;
|
||||
_credentialProviderCatalog = credentialProviderCatalog;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
@@ -122,14 +121,15 @@ namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
var pages = new UserControl[]
|
||||
{
|
||||
new CredentialListPage(_credentialProviderCatalog)
|
||||
new CredentialListPage(CredentialProviderCatalog)
|
||||
{
|
||||
DeletionConfirmer = new CredentialDeletionMsgBoxConfirmer(MessageBox.Show)
|
||||
},
|
||||
new CredentialRepositoriesPage(_credentialProviderCatalog)
|
||||
new CredentialRepositoriesPage(CredentialProviderCatalog)
|
||||
};
|
||||
|
||||
var credentialManagerForm = new CredentialManagerForm(pages);
|
||||
credentialManagerForm.CenterOnTarget(_form);
|
||||
credentialManagerForm.CenterOnTarget(MainForm);
|
||||
credentialManagerForm.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,19 +25,15 @@ namespace mRemoteNG.UI.Menu
|
||||
private ToolStripMenuItem _mMenViewJumpToErrorsInfos;
|
||||
private ToolStripMenuItem _mMenViewResetLayout;
|
||||
private ToolStripSeparator _toolStripSeparator1;
|
||||
private readonly ToolStrip _tsExternalTools;
|
||||
private readonly ToolStrip _tsQuickConnect;
|
||||
private readonly FullscreenHandler _fullscreenHandler;
|
||||
private readonly FrmMain _mainForm;
|
||||
|
||||
public ToolStrip TsExternalTools { get; set; }
|
||||
public ToolStrip TsQuickConnect { get; set; }
|
||||
public FullscreenHandler FullscreenHandler { get; set; }
|
||||
public FrmMain MainForm { get; set; }
|
||||
|
||||
|
||||
public ViewMenu(ToolStrip tsExternalTools, ToolStrip tsQuickConnect, FullscreenHandler fullscreenHandler, FrmMain mainForm)
|
||||
public ViewMenu()
|
||||
{
|
||||
_tsExternalTools = tsExternalTools;
|
||||
_tsQuickConnect = tsQuickConnect;
|
||||
_fullscreenHandler = fullscreenHandler;
|
||||
_mainForm = mainForm;
|
||||
|
||||
Initialize();
|
||||
ApplyLanguage();
|
||||
}
|
||||
@@ -84,7 +80,7 @@ namespace mRemoteNG.UI.Menu
|
||||
Name = "mMenView";
|
||||
Size = new System.Drawing.Size(44, 20);
|
||||
Text = Language.strMenuView;
|
||||
DropDownOpening += mMenView_DropDownOpening;
|
||||
//DropDownOpening += mMenView_DropDownOpening;
|
||||
//
|
||||
// mMenViewAddConnectionPanel
|
||||
//
|
||||
@@ -242,15 +238,15 @@ namespace mRemoteNG.UI.Menu
|
||||
}
|
||||
|
||||
#region View
|
||||
private void mMenView_DropDownOpening(object sender, EventArgs e)
|
||||
internal void mMenView_DropDownOpening(object sender, EventArgs e)
|
||||
{
|
||||
_mMenViewConnections.Checked = !Windows.TreeForm.IsHidden;
|
||||
_mMenViewConfig.Checked = !Windows.ConfigForm.IsHidden;
|
||||
_mMenViewErrorsAndInfos.Checked = !Windows.ErrorsForm.IsHidden;
|
||||
_mMenViewScreenshotManager.Checked = !Windows.ScreenshotForm.IsHidden;
|
||||
|
||||
_mMenViewExtAppsToolbar.Checked = _tsExternalTools.Visible;
|
||||
_mMenViewQuickConnectToolbar.Checked = _tsQuickConnect.Visible;
|
||||
_mMenViewExtAppsToolbar.Checked = TsExternalTools.Visible;
|
||||
_mMenViewQuickConnectToolbar.Checked = TsQuickConnect.Visible;
|
||||
|
||||
_mMenViewConnectionPanels.DropDownItems.Clear();
|
||||
|
||||
@@ -267,7 +263,7 @@ namespace mRemoteNG.UI.Menu
|
||||
|
||||
private void ConnectionPanelMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
((BaseWindow)((ToolStripMenuItem)sender).Tag).Show(_mainForm.pnlDock);
|
||||
((BaseWindow)((ToolStripMenuItem)sender).Tag).Show(MainForm.pnlDock);
|
||||
((BaseWindow)((ToolStripMenuItem)sender).Tag).Focus();
|
||||
}
|
||||
|
||||
@@ -275,7 +271,7 @@ namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
if (_mMenViewConnections.Checked == false)
|
||||
{
|
||||
Windows.TreeForm.Show(_mainForm.pnlDock);
|
||||
Windows.TreeForm.Show(MainForm.pnlDock);
|
||||
_mMenViewConnections.Checked = true;
|
||||
}
|
||||
else
|
||||
@@ -289,7 +285,7 @@ namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
if (_mMenViewConfig.Checked == false)
|
||||
{
|
||||
Windows.ConfigForm.Show(_mainForm.pnlDock);
|
||||
Windows.ConfigForm.Show(MainForm.pnlDock);
|
||||
_mMenViewConfig.Checked = true;
|
||||
}
|
||||
else
|
||||
@@ -303,7 +299,7 @@ namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
if (_mMenViewErrorsAndInfos.Checked == false)
|
||||
{
|
||||
Windows.ErrorsForm.Show(_mainForm.pnlDock);
|
||||
Windows.ErrorsForm.Show(MainForm.pnlDock);
|
||||
_mMenViewErrorsAndInfos.Checked = true;
|
||||
}
|
||||
else
|
||||
@@ -317,7 +313,7 @@ namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
if (_mMenViewScreenshotManager.Checked == false)
|
||||
{
|
||||
Windows.ScreenshotForm.Show(_mainForm.pnlDock);
|
||||
Windows.ScreenshotForm.Show(MainForm.pnlDock);
|
||||
_mMenViewScreenshotManager.Checked = true;
|
||||
}
|
||||
else
|
||||
@@ -329,7 +325,7 @@ namespace mRemoteNG.UI.Menu
|
||||
|
||||
private void mMenViewJumpToConnectionsConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_mainForm.pnlDock.ActiveContent == Windows.TreeForm)
|
||||
if (MainForm.pnlDock.ActiveContent == Windows.TreeForm)
|
||||
{
|
||||
Windows.ConfigForm.Activate();
|
||||
}
|
||||
@@ -350,7 +346,7 @@ namespace mRemoteNG.UI.Menu
|
||||
MessageBoxIcon.Question);
|
||||
if (msgBoxResult == DialogResult.Yes)
|
||||
{
|
||||
_mainForm.SetDefaultLayout();
|
||||
MainForm.SetDefaultLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,12 +359,12 @@ namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
if (_mMenViewExtAppsToolbar.Checked == false)
|
||||
{
|
||||
_tsExternalTools.Visible = true;
|
||||
TsExternalTools.Visible = true;
|
||||
_mMenViewExtAppsToolbar.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_tsExternalTools.Visible = false;
|
||||
TsExternalTools.Visible = false;
|
||||
_mMenViewExtAppsToolbar.Checked = false;
|
||||
}
|
||||
}
|
||||
@@ -377,20 +373,20 @@ namespace mRemoteNG.UI.Menu
|
||||
{
|
||||
if (_mMenViewQuickConnectToolbar.Checked == false)
|
||||
{
|
||||
_tsQuickConnect.Visible = true;
|
||||
TsQuickConnect.Visible = true;
|
||||
_mMenViewQuickConnectToolbar.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
_tsQuickConnect.Visible = false;
|
||||
TsQuickConnect.Visible = false;
|
||||
_mMenViewQuickConnectToolbar.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void mMenViewFullscreen_Click(object sender, EventArgs e)
|
||||
{
|
||||
_fullscreenHandler.Value = !_fullscreenHandler.Value;
|
||||
_mMenViewFullscreen.Checked = _fullscreenHandler.Value;
|
||||
FullscreenHandler.Value = !FullscreenHandler.Value;
|
||||
_mMenViewFullscreen.Checked = FullscreenHandler.Value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ namespace mRemoteNG.UI.Window
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("Failed to properly show the ComponentsWindow", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("Failed to properly show the ComponentsWindow", ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace mRemoteNG.UI.Window
|
||||
//
|
||||
//pnlContainer
|
||||
//
|
||||
this.pnlContainer.Anchor = (System.Windows.Forms.AnchorStyles) (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right);
|
||||
this.pnlContainer.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom
|
||||
| System.Windows.Forms.AnchorStyles.Left
|
||||
| System.Windows.Forms.AnchorStyles.Right;
|
||||
this.pnlContainer.Location = new System.Drawing.Point(0, 27);
|
||||
this.pnlContainer.Name = "pnlContainer";
|
||||
this.pnlContainer.Size = new System.Drawing.Size(446, 335);
|
||||
@@ -118,12 +118,13 @@ namespace mRemoteNG.UI.Window
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "StartListening (UI.Window.UltraVNCSC) failed" + Environment.NewLine + ex.Message, false);
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "StartListening (UI.Window.UltraVNCSC) failed" + Environment.NewLine + ex.Message);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupLicense()
|
||||
|
||||
#if false
|
||||
private void SetupLicense()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -136,7 +137,8 @@ namespace mRemoteNG.UI.Window
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "VNC SetupLicense failed (UI.Window.UltraVNCSC)" + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//Private Sub vnc_ConnectionAccepted(ByVal sender As Object, ByVal e As AxViewerX._ISmartCodeVNCViewerEvents_ConnectionAcceptedEvent) Handles vnc.ConnectionAccepted
|
||||
// mC.AddMessage(Messages.MessageClass.InformationMsg, e.bstrServerAddress & " is now connected to your UltraVNC SingleClick panel!")
|
||||
//End Sub
|
||||
@@ -145,12 +147,12 @@ namespace mRemoteNG.UI.Window
|
||||
// StartListening()
|
||||
//End Sub
|
||||
|
||||
private void btnDisconnect_Click(System.Object sender, System.EventArgs e)
|
||||
private void btnDisconnect_Click(object sender, EventArgs e)
|
||||
{
|
||||
//vnc.Dispose()
|
||||
Dispose();
|
||||
Windows.Show(WindowType.UltraVNCSC);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Window;
|
||||
|
||||
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
namespace mRemoteNG.UI
|
||||
{
|
||||
public class WindowList : CollectionBase
|
||||
{
|
||||
@@ -13,13 +11,13 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CleanUp();
|
||||
CleanUp();
|
||||
if (Index is BaseWindow)
|
||||
return IndexByObject(Index);
|
||||
else if (Index is Int32)
|
||||
return IndexByNumber(Convert.ToInt32(Index));
|
||||
|
||||
return null;
|
||||
if (Index is int)
|
||||
return IndexByNumber(Convert.ToInt32(Index));
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +25,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CleanUp();
|
||||
CleanUp();
|
||||
return List.Count;
|
||||
}
|
||||
}
|
||||
@@ -36,27 +34,27 @@ namespace mRemoteNG.UI.Window
|
||||
#region Public Methods
|
||||
public void Add(BaseWindow uiWindow)
|
||||
{
|
||||
this.List.Add(uiWindow);
|
||||
List.Add(uiWindow);
|
||||
//AddHandler uiWindow.FormClosing, AddressOf uiFormClosing
|
||||
}
|
||||
|
||||
public void AddRange(BaseWindow[] uiWindow)
|
||||
{
|
||||
foreach (Form uW in uiWindow)
|
||||
foreach (var uW in uiWindow)
|
||||
{
|
||||
this.List.Add(uW);
|
||||
List.Add(uW);
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove(BaseWindow uiWindow)
|
||||
{
|
||||
this.List.Remove(uiWindow);
|
||||
List.Remove(uiWindow);
|
||||
}
|
||||
|
||||
public BaseWindow FromString(string uiWindow)
|
||||
{
|
||||
this.CleanUp();
|
||||
for (int i = 0; i < this.List.Count; i++)
|
||||
CleanUp();
|
||||
for (var i = 0; i < List.Count; i++)
|
||||
{
|
||||
if (this[i].Text == uiWindow.Replace("&", "&&"))
|
||||
{
|
||||
@@ -71,19 +69,18 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
private void CleanUp()
|
||||
{
|
||||
for (int i = 0; i <= this.List.Count - 1; i++)
|
||||
for (var i = 0; i <= List.Count - 1; i++)
|
||||
{
|
||||
if (i > this.List.Count - 1)
|
||||
if (i > List.Count - 1)
|
||||
{
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
if ((this.List[i] as BaseWindow).IsDisposed)
|
||||
{
|
||||
this.List.RemoveAt(i);
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
var baseWindow = List[i] as BaseWindow;
|
||||
if (baseWindow != null && !baseWindow.IsDisposed) continue;
|
||||
List.RemoveAt(i);
|
||||
CleanUp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +88,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
try
|
||||
{
|
||||
int objectIndex = this.List.IndexOf(Index);
|
||||
var objectIndex = List.IndexOf(Index);
|
||||
return IndexByNumber(objectIndex);
|
||||
}
|
||||
catch (ArgumentOutOfRangeException e)
|
||||
@@ -104,17 +101,19 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.List[Index] as BaseWindow;
|
||||
return List[Index] as BaseWindow;
|
||||
}
|
||||
catch (ArgumentOutOfRangeException e)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(e.ParamName, e.ActualValue, "Index was out of bounds");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
private void uiFormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
this.List.Remove(sender);
|
||||
List.Remove(sender);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="mRemoteNG.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="mRemoteNG.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="mRemoteNG.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="mRemoteNG.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<log4net>
|
||||
@@ -22,10 +22,10 @@
|
||||
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="${APPDATA}\mRemoteNG\mRemoteNG.log"/>
|
||||
<appendToFile value="true"/>
|
||||
<rollingStyle value="Size" />
|
||||
<maxSizeRollBackups value="5" />
|
||||
<maximumFileSize value="10MB" />
|
||||
<staticLogFileName value="true" />
|
||||
<rollingStyle value="Size"/>
|
||||
<maxSizeRollBackups value="5"/>
|
||||
<maximumFileSize value="10MB"/>
|
||||
<staticLogFileName value="true"/>
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %-6level- %message%newline"/>
|
||||
</layout>
|
||||
@@ -50,7 +50,7 @@
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CustomPuttyPath" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="SwitchToMCOnInformation" serializeAs="String">
|
||||
<value>True</value>
|
||||
@@ -68,7 +68,7 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="CustomConsPath" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="SaveConsOnExit" serializeAs="String">
|
||||
<value>True</value>
|
||||
@@ -95,13 +95,13 @@
|
||||
<value>noinfo</value>
|
||||
</setting>
|
||||
<setting name="DefaultUsername" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="DefaultPassword" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="DefaultDomain" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="UseCustomPuttyPath" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -119,7 +119,7 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UpdateProxyAddress" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="UpdateProxyPort" serializeAs="String">
|
||||
<value>80</value>
|
||||
@@ -128,13 +128,13 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="UpdateProxyAuthUser" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="UpdateProxyAuthPass" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultDescription" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultProtocol" serializeAs="String">
|
||||
<value>RDP</value>
|
||||
@@ -221,13 +221,13 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="SQLHost" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="SQLUser" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="SQLPass" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="InhDefaultCacheBitmaps" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -299,10 +299,10 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ConDefaultPreExtApp" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultPostExtApp" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="InhDefaultPreExtApp" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -341,10 +341,10 @@
|
||||
<value>EncHextile</value>
|
||||
</setting>
|
||||
<setting name="ConDefaultVNCProxyIP" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultVNCProxyPassword" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultVNCProxyPort" serializeAs="String">
|
||||
<value>0</value>
|
||||
@@ -353,7 +353,7 @@
|
||||
<value>ProxyNone</value>
|
||||
</setting>
|
||||
<setting name="ConDefaultVNCProxyUsername" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="InhDefaultVNCAuthMode" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -407,7 +407,7 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="XULRunnerPath" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultRenderingEngine" serializeAs="String">
|
||||
<value>IE</value>
|
||||
@@ -416,7 +416,7 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ConDefaultMacAddress" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="InhDefaultMacAddress" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -425,13 +425,13 @@
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ConDefaultUserField" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="InhDefaultUserField" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ConDefaultExtApp" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="InhDefaultExtApp" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -479,19 +479,19 @@
|
||||
<value>5</value>
|
||||
</setting>
|
||||
<setting name="OverrideUICulture" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultRDGatewayHostname" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultRDGatewayUsername" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultRDGatewayPassword" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultRDGatewayDomain" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultEnableFontSmoothing" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -533,22 +533,22 @@
|
||||
<value>release</value>
|
||||
</setting>
|
||||
<setting name="ThemeName" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ShowConfigHelpText" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="PuttySavedSessionsName" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="PuttySavedSessionsPanel" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="CompatibilityWarnLenovoAutoScrollUtility" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="ConDefaultLoadBalanceInfo" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="ConDefaultAutomaticResize" serializeAs="String">
|
||||
<value>True</value>
|
||||
@@ -608,7 +608,7 @@
|
||||
<value>00000000-0000-0000-0000-000000000000</value>
|
||||
</setting>
|
||||
<setting name="LogFilePath" serializeAs="String">
|
||||
<value />
|
||||
<value/>
|
||||
</setting>
|
||||
<setting name="TextLogMessageWriterWriteDebugMsgs" serializeAs="String">
|
||||
<value>False</value>
|
||||
@@ -653,16 +653,16 @@
|
||||
</userSettings>
|
||||
<applicationSettings>
|
||||
<mRemoteNG.Settings>
|
||||
<setting name="SupportedUICultures" serializeAs="String">
|
||||
<value>de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW</value>
|
||||
</setting>
|
||||
<setting name="UpdateAddress" serializeAs="String">
|
||||
<value>https://mremoteng.org/</value>
|
||||
</setting>
|
||||
<setting name="SupportedUICultures" serializeAs="String">
|
||||
<value>cs-CZ,de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW</value>
|
||||
</setting>
|
||||
</mRemoteNG.Settings>
|
||||
</applicationSettings>
|
||||
|
||||
<runtime>
|
||||
<generatePublisherEvidence enabled="false"/>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
<SignManifests>false</SignManifests>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<ResolveComReferenceSilent>True</ResolveComReferenceSilent>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@@ -42,9 +45,6 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<ResolveComReferenceSilent>True</ResolveComReferenceSilent>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
||||
@@ -59,15 +59,15 @@
|
||||
<HintPath>..\packages\Geckofx45.45.0.22\lib\net40\Geckofx-Winforms.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="ADTree, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>References\ADTree.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>References\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MagicLibrary, Version=1.7.4.0, Culture=neutral, PublicKeyToken=3a6eb82f876a49bc">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>References\MagicLibrary.dll</HintPath>
|
||||
@@ -206,6 +206,7 @@
|
||||
<Compile Include="Connection\IConnectionInitiator.cs" />
|
||||
<Compile Include="Connection\IInheritable.cs" />
|
||||
<Compile Include="Connection\IHasParent.cs" />
|
||||
<Compile Include="Connection\Protocol\Http\Connection.Protocol.HTTPS.CertEvent.cs" />
|
||||
<Compile Include="Connection\Protocol\ProtocolFactory.cs" />
|
||||
<Compile Include="Connection\Protocol\VNC\VNCEnum.cs" />
|
||||
<Compile Include="Credential\CredentialChangedEventArgs.cs" />
|
||||
@@ -678,6 +679,7 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Resources\Language\Language.cs-CZ.resx" />
|
||||
<EmbeddedResource Include="Resources\Language\Language.ja-JP.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
@@ -1474,7 +1476,17 @@
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>powershell -noprofile -command "sleep 2"
|
||||
call "$(DevEnvDir)..\tools\vsvars32.bat"
|
||||
|
||||
rem VS 2015
|
||||
IF EXIST "$(DevEnvDir)..\tools\vsvars32.bat" (
|
||||
call "$(DevEnvDir)..\tools\vsvars32.bat"
|
||||
)
|
||||
|
||||
rem VS 2017
|
||||
IF EXIST "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat" (
|
||||
call "$(DevEnvDir)..\..\VC\Auxiliary\Build\vcvars32.bat"
|
||||
)
|
||||
|
||||
set /p buildenv=<buildenv.tmp
|
||||
|
||||
echo Copy PUTTYNG to correct directory
|
||||
@@ -1497,7 +1509,7 @@ editbin /largeaddressaware mRemoteNG.exe
|
||||
IF EXIST C:\mRemoteNG_code_signing_cert.pfx (
|
||||
echo Signing binaries
|
||||
IF %25buildenv: Portable=%25==Release (
|
||||
powershell "&""$(SolutionDir)Tools\signfiles.ps1""" '%25cd%25'
|
||||
powershell -File "$(SolutionDir)Tools\signfiles.ps1" -PathToSignableFiles %25cd%25 -Exclude 'PuTTYNG.exe'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1523,6 +1535,7 @@ IF %25buildenv: =%25==ReleasePortable (
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
@@ -1534,6 +1547,7 @@ IF %25buildenv: =%25==ReleasePortable (
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release Portable|x86'">
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
@@ -1545,6 +1559,7 @@ IF %25buildenv: =%25==ReleasePortable (
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug Portable|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -1557,6 +1572,7 @@ IF %25buildenv: =%25==ReleasePortable (
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<package id="DockPanelSuite" version="2.10.0" targetFramework="net40" />
|
||||
<package id="DockPanelSuite.ThemeVS2012Light" version="2.10.0" targetFramework="net40" />
|
||||
<package id="Geckofx45" version="45.0.22" targetFramework="net40" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net40" />
|
||||
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net40" />
|
||||
<package id="SSH.NET" version="2016.0.0" targetFramework="net40" />
|
||||
</packages>
|
||||
199
packages/NSubstitute.1.10.0.0/BreakingChanges.txt
vendored
199
packages/NSubstitute.1.10.0.0/BreakingChanges.txt
vendored
@@ -1,199 +0,0 @@
|
||||
================================================================================================
|
||||
1.10.0 Release
|
||||
================================================================================================
|
||||
|
||||
Substitutes will now automatically return an empty `IQueryable<T>` for
|
||||
members that return that type. Tests previously relying on a
|
||||
substitute `IQueryable<T>` will no longer work properly.
|
||||
|
||||
Reason:
|
||||
Code that uses an `IQueryable<T>` can now run using the auto-subbed
|
||||
value without causing null pointer exceptions (see issue #67).
|
||||
|
||||
Fix:
|
||||
Avoid mocking `IQueryable<T>` where possible -- configure members
|
||||
to return a real `IQueryable<T>` instead.
|
||||
If a substitute is required, explicitly configure the call to return
|
||||
a substitute:
|
||||
|
||||
sub.MyQueryable().Returns(Substitute.For<IQueryable<int>>());
|
||||
|
||||
|
||||
================================================================================================
|
||||
1.9.1 Release
|
||||
================================================================================================
|
||||
|
||||
Substitutes set up to throw exception for methods with return type Task<T>
|
||||
cause compilation to fail due to the call being ambiguous (CS0121).
|
||||
"The call is ambiguous between the following methods or properties:
|
||||
.Returns<Task<T>> and .Returns<T>"
|
||||
|
||||
Reason:
|
||||
To make it easier to stub async methods. See issue #189.
|
||||
|
||||
Fix:
|
||||
Specify generic type argument explicitly. If Method() returns string:
|
||||
Old: sub.Method().Returns(x => { throw new Exception() });
|
||||
New: sub.Method().Returns<string>(x => { throw new Exception() });
|
||||
|
||||
================================================================================================
|
||||
1.8.0 Release
|
||||
================================================================================================
|
||||
|
||||
Incorrect use of argument matchers outside of a member call, particularly within a
|
||||
Returns(), will now throw an exception (instead of causing unexpected behaviour
|
||||
in other tests: see https://github.com/nsubstitute/NSubstitute/issues/149).
|
||||
|
||||
Reason:
|
||||
Prevent accidental incorrect use from causing hard-to-find errors in unrelated tests.
|
||||
|
||||
Fix:
|
||||
Do not use argument matchers in Returns() or outside of where an argument is normally used.
|
||||
Correct use: sub.Method(Arg.Any<string>()).Returns("hi")
|
||||
Incorrect use: sub.Method().Returns(Arg.Any<string>())
|
||||
|
||||
================================================================================================
|
||||
1.7.0 Release
|
||||
================================================================================================
|
||||
|
||||
Auto-substitute for pure virtual classes with at least one public static method, which
|
||||
means some methods and properties on substitutes that used to return null by default will now
|
||||
return a new substitute of that type.
|
||||
|
||||
Reason:
|
||||
Keep consistency with the behaviour of other pure virtual classes.
|
||||
|
||||
Fix:
|
||||
Explicitly return null from methods and property getters when required for a test.
|
||||
e.g. sub.Method().Returns(x => null);
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
|
||||
Moved `Received.InOrder` feature from `NSubstitute.Experimental` to main `NSubstitute` namespace.
|
||||
Obsoleted original `NSubstitute.Experimental.Received`.
|
||||
|
||||
This can result in ambiguous reference compiler errors and obsolete member compiler earnings.
|
||||
|
||||
Reason:
|
||||
Promoted experimental Received feature to core library.
|
||||
|
||||
Fix:
|
||||
Import `NSubstitute` namespace instead of `NSubstitute.Experimental`.
|
||||
(If `NSubstitute` is already imported just delete the `using NSubstitute.Experimental;` line from your fixtures.)
|
||||
|
||||
================================================================================================
|
||||
1.5.0 Release
|
||||
================================================================================================
|
||||
|
||||
The base object methods (Equals, GetHashCode and ToString) for substitute objects of classes that
|
||||
extend those methods now return the result of calling the actual implementation of those methods
|
||||
rather than the default value for the return type. This means that places where you relied on
|
||||
.Equals returning false, .ToString returning null and .GetHashCode returning 0 because the actual
|
||||
methods weren't called will now call the actual implementation.
|
||||
|
||||
Reason:
|
||||
Substitute objects of classes that overrode those methods that were used as parameters for
|
||||
setting up return values or checking received calls weren't able to be directly used within the
|
||||
call, e.g. instead of:
|
||||
|
||||
someObject.SomeCall(aSubstitute).Returns(1);
|
||||
|
||||
You previously needed to have:
|
||||
|
||||
someObject.SomeCall(Arg.Is<TypeBeingSubstituted>(a => a == aSubstitute)).Returns(1);
|
||||
|
||||
However, now you can use the former, which is much more terse and consistent with the way other
|
||||
Returns or Received calls work.
|
||||
|
||||
This means that substitute objects will now always work like .NET objects rather than being
|
||||
inconsistent when the class being substituted overrode any of those base object methods.
|
||||
|
||||
Fix:
|
||||
There is no workaround to change the behaviour of .Equals, .GetHashCode or .ToString. If you have
|
||||
a use case to change the behaviour of these methods please lodge an issue at the NSubstitute
|
||||
Github site.
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
|
||||
In rare cases the new `Returns()` and `ReturnsForAnyArgs()` overloads can cause compilation to fail due to the call being ambiguous (CS0121).
|
||||
|
||||
Reason:
|
||||
The new overloads allow a sequence of callbacks to be used for return values. A common example is return several values, then throwing an exception.
|
||||
|
||||
Fix:
|
||||
Remove the ambiguity by explicitly casting the arguments types or by using lambda syntax.
|
||||
e.g. sub.Call().Returns(x => null, x => null);
|
||||
|
||||
================================================================================================
|
||||
1.4.0 Release
|
||||
================================================================================================
|
||||
|
||||
Auto-substitute from substitutes of `Func` delegates (following the same rules as auto-subbing
|
||||
for methods and properties). So the delegate returned from `Substitute.For<Func<IFoo>>()` will
|
||||
return a substitute of `IFoo`. This means some substitutes for delegates that used to return
|
||||
null will now return a new substitute.
|
||||
|
||||
Reason:
|
||||
Reduced setup when substituting for `Func` delegates, and consistency with behaviour for
|
||||
properties and methods.
|
||||
|
||||
Fix:
|
||||
Explicitly return null from substitute delegates when required for a test.
|
||||
e.g. subFunc().Returns(x => null);
|
||||
|
||||
|
||||
================================================================================================
|
||||
1.2.0 Release
|
||||
================================================================================================
|
||||
|
||||
Auto-substitute for pure virtual classes (in addition to interfaces and delegate types), which
|
||||
means some methods and properties on substitutes that used to return null by default will now
|
||||
return a new substitute of that type.
|
||||
|
||||
Reason:
|
||||
Cut down the code required to configure substitute members that return interface-like types
|
||||
(e.g. ASP.NET web abstractions like HttpContextBase) which are safe to create and proxy.
|
||||
|
||||
Safe classes are those with all their public methods and properties defined as virtual or
|
||||
abstract, and containing a default, parameterless constructor defined as public or protected.
|
||||
|
||||
Fix:
|
||||
Explicitly return null from methods and property getters when required for a test.
|
||||
e.g. sub.Method().Returns(x => null);
|
||||
|
||||
|
||||
================================================================================================
|
||||
0.9.5 Release
|
||||
================================================================================================
|
||||
|
||||
Raise.Event<TEventArgs>(...) methods renamed to Raise.EventWith<TEventArgs()
|
||||
|
||||
Reason:
|
||||
The Raise.Event<TEventArgs>() signature would often conflict with the
|
||||
Raise.Event<THandler>() method which is used to raise all types of events.
|
||||
|
||||
Raise.Event<THandler>() will now always work for any event type, while
|
||||
Raise.EventWith<TEventArgs>() can be used as a shortcut to raise
|
||||
EventHandler-style events with a particular argument.
|
||||
|
||||
Fix:
|
||||
Replace Raise.Event<TEventArgs>() calls with equivalent Raise.EventWith<TEventArgs>() call.
|
||||
|
||||
------------------------------------------------------------------------------------------------
|
||||
Raise.Action() methods removed
|
||||
|
||||
Reason:
|
||||
The Raise.Event<THandler>() method can be used to raise all delegate events, including Actions.
|
||||
Raise.Action() was removed so there is a consistent way of raising all delegate events.
|
||||
|
||||
Fix:
|
||||
- Replace Raise.Action() calls with Raise.Event<Action>().
|
||||
- Replace Raise.Action<T>(T arg) calls with Raise.Event<Action<T>>(arg).
|
||||
- Replace Raise.Action<T1,T2>(T1 x, T2 y) calls with Raise.Event<Action<T1,T2>>(x, y).
|
||||
|
||||
|
||||
================================================================================================
|
||||
0.9.0 Release
|
||||
================================================================================================
|
||||
|
||||
No breaking changes.
|
||||
151
packages/NSubstitute.1.10.0.0/CHANGELOG.txt
vendored
151
packages/NSubstitute.1.10.0.0/CHANGELOG.txt
vendored
@@ -1,151 +0,0 @@
|
||||
### 1.10.0 (March 2016)
|
||||
* [NEW] Callbacks builder for more control over When..Do callbacks. Thanks to bartoszgolek. (#202, #200)
|
||||
* [NEW] Auto-substitute for IQueryable<T>. Thanks to emragins. (#67)
|
||||
* [FIX] Fix bug when showing params arguments for value types (#214)
|
||||
* [FIX] Fix bug when showing params arguments for Received.InOrder calls (#211)
|
||||
|
||||
### 1.9.2 (October 2015)
|
||||
* [UPDATE] Mark Exceptions as [Serializable]. Thanks to David Mann. (#201)
|
||||
* [FIX] Fix bug with concurrently creating delegate substitutes. Thanks to Alexandr Nikitin. (#205)
|
||||
|
||||
### 1.9.1 (October 2015)
|
||||
* [FIX] Fix bug introduced in 1.9.0 that made checking a call was Received() clear previously stubbed values for that call.
|
||||
|
||||
### 1.9.0 (October 2015)
|
||||
* [NEW] Allow awaiting of async methods with Received()/DidNotReceive(). Thanks to Marcio Rinaldi for this contribution. (#190, #191)
|
||||
* [NEW] Task-specific Returns methods to make it easier to stub async methods. Thanks to Antony Koch for implementing this, and thanks to Marius Gundersen and Alexandr Nikitin for the suggestion and discussion regarding the change. (#189) (Also thanks to Jake Ginnivan who tried adding this back in #91, but I didn't merge that part of the PR in. Sorry!)
|
||||
* [NEW] ReturnsForAll<T> extension method. Thanks to Mike Hanson for this contribution. (#198, #196)
|
||||
|
||||
### 1.8.2 (May 2015)
|
||||
* [NEW] Convenience .ReturnsNull() extensions in NSubstitute.ReturnsExtensions. Thanks to Michal Wereda for this contribution. (#181)
|
||||
* [NEW] CallInfo.ArgAt<T>(int) added to match argument at a given position and cast to the required type. Thanks to @jotabe-net for this contribution. (#175)
|
||||
* [NEW] Convenience Throws() extensions in NSubstitute.ExceptionExtensions (sub.MyCall().Throws(ex)). Thanks to Michal Wereda for this contribution. Thanks also to Geir Sagberg for helpful suggestions relating to this feature. (#172)
|
||||
|
||||
### 1.8.1 (December 2014)
|
||||
* [FIX] Fix for methods returning multidimensional arrays. Thanks to Alexandr Nikitin. (#170)
|
||||
|
||||
### 1.8.0 (November 2014)
|
||||
* [NEW] Convenience methods for throwing exceptions with When-Do. Thanks to Geir Sagberg for this contribution.
|
||||
* [FIX] Throw exception when arg matcher used within Returns. (#149)
|
||||
|
||||
### 1.7.2 (March 2014)
|
||||
* [FIX] Basic support for types that return dynamic. Thanks to Alexandr Nikitin. (#75)
|
||||
* [NEW] Auto-subbing for observables. Thanks to Paul Betts.
|
||||
|
||||
### 1.7.1 (January 2014)
|
||||
* [FIX] Ambiguous arg exception with out/ref parameters. Thanks to Alexandr Nikitin. (#129)
|
||||
|
||||
### 1.7.0 (January 2014)
|
||||
* [NEW] Partial subs (Substitute.ForPartsOf<T>()). Thanks to Alexandr Nikitin for tonnes of hard work on this feature (and for putting up with a vacillating project owner :)).
|
||||
* [UPDATE] Received.InOrder moved out of Experimental namespace.
|
||||
* [FIX] Argument matching with optional parameters. Thanks to Peter Wiles. (#111)
|
||||
* [FIX] Argument matching with out/ref. Thanks to Kevin Bosman. (#111)
|
||||
* [FIX] The default return value for any call that returns a concrete type that is purely virtual, but also has at least one public static method in it will be a substitute rather than null. Thanks to Robert Moore (@robdmoore) for this contribution. (#118)
|
||||
|
||||
### 1.6.1 (June 2013)
|
||||
* [FIX] Detect and throw on type mismatches in Returns() caused by Returns(ConfigureOtherSub()).
|
||||
* [FIX] Support raising exceptions that do not implement a serialisation constructor (#110). Thanks to Alexandr Nikitin for this contribution.
|
||||
|
||||
### 1.6.0 (April 2013)
|
||||
* [NEW] .AndDoes() method for chaining a callback after a Returns(). (#98)
|
||||
* [FIX] Handling calls with params argument of value types, thanks to Eric Winkler.
|
||||
* [FIX] Can now substitute for interfaces implementing System.Windows.IDataObject, thanks to Johan Appelgren.
|
||||
* [UPDATE] Improved XML doc comments, thanks to David Gardiner.
|
||||
|
||||
### 1.5.0 (January 2013)
|
||||
* [EXPERIMENTAL] Asserting ordered call sequences
|
||||
* [FIX] Arg.Invoke with four arguments now passes fourth arg correctly (#88). Thanks to Ville Salonen (@VilleSalonen) for finding and patching this.
|
||||
* [FIX] Substitute objects now use actual implementation for base object methods (Equals, GetHashCode, ToString). Thanks to Robert Moore (@robdmoore) for this contribution. (#77)
|
||||
* [NEW] Auto-substitute for Task/Task<T>. Task<T> will use substitute rules that T would use. Thanks to Jake Ginnivan (@JakeGinnivan) for this contribution.
|
||||
* [NEW] Match derived types for generic calls (#97). Thanks to Iain Ballard for this contribution.
|
||||
* [NEW] Returns now supports passing multiple callbacks, which makes it easier to combine stubbing multiple return values followed by throwing an exception (#99). Thanks to Alexandr Nikitin for this contribution.
|
||||
|
||||
### 1.4.3 (August 2012)
|
||||
* [FIX] Updated to Castle.Core 3.1.0 to fix an issue proxying generic methods with a struct constraint (#83).
|
||||
|
||||
### 1.4.2 (July 2012)
|
||||
* [FIX] Issue using NET40 build on Mono (due to NET45 build tools incompatibility)
|
||||
|
||||
### 1.4.1 (June 2012)
|
||||
* [FIX] Fix matching Nullable<T> arguments when arg value is null. Thanks to Magnus Olstad Hansen (@maggedotno) for this contribution. (#78)
|
||||
* [UPDATE] Updated to Castle.Core 3.0.0.
|
||||
|
||||
### 1.4.0 (May 2012)
|
||||
* [NEW] [BREAKING] Auto-substitute for types returned from substitutes of delegates/Funcs (follows same auto-substitute rules as for methods and properties). Thanks to Sauli T<>hk<68>p<EFBFBD><70> for implementing this feature. (#52)
|
||||
* [NEW] Show details of params arguments when displaying received calls. Thanks to Sauli T<>hk<68>p<EFBFBD><70> for implementing this feature. (#65)
|
||||
* [FIX] Race condition between checking received calls and building the exception could cause nonsensical exception messages like "Expected 5, actually received 5" when called concurrently. (#64)
|
||||
|
||||
### 1.3.0 (Nov 2011)
|
||||
* [NEW] Support for Received(times) to assert a call was received a certain number of times. Thanks to Abi Bellamkonda for this contribution. (#63)
|
||||
* [FIX] Improved support for calling substitutes from multiple threads. (#62)
|
||||
|
||||
### 1.2.1 (Oct 2011)
|
||||
* [FIX] Some combinations of Arg.Do and Returns() caused incorrect values to be returned. (#59)
|
||||
* [UPDATE] WCF ServiceContractAttribute no longer applied to proxies. (#60)
|
||||
* [FIX] Passing null could cause argument actions to fail. (#61)
|
||||
* [FIX] Calls to virtual methods from constructors of classes being substituted for are no longer recorded, to prevent non-obvious behaviour when calling Returns() on an auto-substituted value. (#57)
|
||||
|
||||
### 1.2.0 (Sep 2011)
|
||||
* [NEW] Arg.Do() syntax for capturing arguments passed to a method and performing some action with them whenever the method is called.
|
||||
* [NEW] Arg.Invoke() syntax for invoking callbacks passed as arguments to a method whenever the method is called.
|
||||
* [NEW] Basic support for setting out/ref parameters.
|
||||
* [FIX] Property behaviour for indexed properties (Issue #53)
|
||||
* [UPDATE] [BREAKING] Auto-substitute for pure virtual classes, including common ASP.NET web abstractions. Use .Returns(x=>null) to explicitly return null from these members if required. Thanks to Tatham Oddie for original idea and patch, and Krzysztof Kozmic for suggesting and defining which classes would be safe to automatically proxy.
|
||||
* [UPDATE] Changed layout of package for eventual support for multiple framework targets.
|
||||
* [FIX] Failure to match calls with ref arguments using ReceivedWithAnyArgs().
|
||||
* [FIX] Incorrect ambiguous args exception when supplying value type arg specs for object arguments.
|
||||
|
||||
### 1.1.0 (May 2011)
|
||||
* [UPDATE] Updated to Castle.Core 2.5.3.
|
||||
* [FIX] Fixed bug when raising a delegate event with a null argument.
|
||||
* [FIX] CallInfo.Arg<T>() now works more reliably, including for null arguments.
|
||||
* [FIX] Better exception when accidentally calling substitute extension method with a null reference (e.g. foo.Received().Call() when foo is null)
|
||||
* [UPDATE] Exceptions thrown in custom argument matchers (Arg.Is<T>(x => ...)) will now silently fail to match the argument, rather than allowing exceptions to bubble up.
|
||||
* [NEW] Support for test fixtures run in parallel.
|
||||
|
||||
### 1.0.0 (Dec 2010)
|
||||
* [FIX] Using Returns(null) for value types throws, rather than returning default(T).
|
||||
|
||||
0.9.5 Release Candidate
|
||||
* [FIX] Fixed bug when trying to return null from a call to a substitute.
|
||||
* [FIX] Equals() for class substitutes fixed by not intercepting Object methods Equals(), ToString() and GetHashCode().
|
||||
* [NEW] Raise.Event<THandler>() methods to raise any type of event, including delegates.
|
||||
* [BREAKING] Raise.Action() methods removed. Use Raise.Event<THandler>() (e.g. Raise.Event<Action>>()).
|
||||
* [BREAKING] Renamed Raise.Event<TEventArgs>() methods to Raise.EventWith<TEventArgs>().
|
||||
* [UPDATE] Arg matchers can be specified using more specific, compatible type (Arg.Is<string>(..) for arg of type object).
|
||||
* [NEW] NSubstitute website and documentation http://nsubstitute.github.com
|
||||
* [FIX] Formating for argument matchers that take predicate functions.
|
||||
* [FIX] Match single argument matcher passed to params arg (#34)
|
||||
* [FIX] Detect ambiguous arg matchers in additional case (#31)
|
||||
* [FIX] Can modify event handler subscriptions from within event callback
|
||||
* [UPDATE] Update to Castle.Core 2.5.2
|
||||
* [FIX] Can substitute for SynchronizationContext in .NET4 (fixed in Castle.Core)
|
||||
* [NEW] NSubstitute available as NuPack package
|
||||
|
||||
### 0.9.0 Beta 1
|
||||
* [FIX] Now handles argument specifiers used for params arguments correctly
|
||||
* [UPDATE] Updated to Castle.Core 2.5 final.
|
||||
|
||||
### 0.1.3 alpha 4
|
||||
* [NEW] Support auto/recursive substituting for members that return interfaces or delegates.
|
||||
* [NEW] Support auto substituting for members that return arrays and strings (return empty values rather than null).
|
||||
* [NEW] Raise.Event<TEventArgs>() will now attempt to construct arguments with default ctors, so in most cases they will not need to be explictly provided.
|
||||
* [UPDATE] Added support for raising events with custom delegate types.
|
||||
* [UPDATE] Formatting for event subscription and unsubscription calls in call received/not received exceptions.
|
||||
* [UPDATE] Updated to pre-release build of Castle.Core 2.5 to get dynamic proxy to support modopts.
|
||||
* [FIX] Throw correct exception when raising an event and event handler throws. (Fix by Rodrigo Perera)
|
||||
* [FIX] Record call as received when it throws an exception from the When..Do callback.
|
||||
|
||||
### 0.1.2 alpha 3
|
||||
* [NEW] Marked non-matching parameters in the actual calls listed for CallNotReceivedException messages.
|
||||
* [NEW] Added WhenForAnyArgs..Do syntax for callbacks.
|
||||
* [UPDATE] Updated arg matching to be smarter when matchers are not used for all args.
|
||||
* [FIX] Fixed bug when substituting for delegates with multiple parameters.
|
||||
* [FIX] Removed redundant cast operator which sometimes caused the compiler trouble in resolving Raise.Event().
|
||||
|
||||
### 0.1.1 alpha 2
|
||||
* [NEW] Added ReturnsForAnyArgs() extension methods
|
||||
* [FIX] Compiled for Any CPU to run on x64 platforms
|
||||
|
||||
### 0.1.0 alpha
|
||||
* Initial release
|
||||
27
packages/NSubstitute.1.10.0.0/LICENSE.txt
vendored
27
packages/NSubstitute.1.10.0.0/LICENSE.txt
vendored
@@ -1,27 +0,0 @@
|
||||
Copyright (c) 2009 Anthony Egerton (nsubstitute@delfish.com) and David Tchepak (dave@davesquared.net)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the names of the copyright holders nor the names of
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
[ http://www.opensource.org/licenses/bsd-license.php ]
|
||||
Binary file not shown.
113
packages/NSubstitute.1.10.0.0/README.txt
vendored
113
packages/NSubstitute.1.10.0.0/README.txt
vendored
@@ -1,113 +0,0 @@
|
||||
NSubstitute
|
||||
========
|
||||
|
||||
Visit the [NSubstitute website](http://nsubstitute.github.com) for more information.
|
||||
|
||||
### What is it?
|
||||
|
||||
NSubstitute is designed as a friendly substitute for .NET mocking libraries.
|
||||
|
||||
It is an attempt to satisfy our craving for a mocking library with a succinct syntax that helps us keep the focus on the intention of our tests, rather than on the configuration of our test doubles. We've tried to make the most frequently required operations obvious and easy to use, keeping less usual scenarios discoverable and accessible, and all the while maintaining as much natural language as possible.
|
||||
|
||||
Perfect for those new to testing, and for others who would just like to to get their tests written with less noise and fewer lambdas.
|
||||
|
||||
### Getting help
|
||||
|
||||
If you have questions or feedback on NSubstitute, head on over to the [NSubstitute discussion group](http://groups.google.com/group/nsubstitute).
|
||||
|
||||
### Basic use
|
||||
|
||||
Let's say we have a basic calculator interface:
|
||||
|
||||
|
||||
public interface ICalculator
|
||||
{
|
||||
int Add(int a, int b);
|
||||
string Mode { get; set; }
|
||||
event Action PoweringUp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
We can ask NSubstitute to create a substitute instance for this type. We could ask for a stub, mock, fake, spy, test double etc., but why bother when we just want to substitute an instance we have some control over?
|
||||
|
||||
|
||||
_calculator = Substitute.For<ICalculator>();
|
||||
|
||||
|
||||
Now we can tell our substitute to return a value for a call:
|
||||
|
||||
|
||||
_calculator.Add(1, 2).Returns(3);
|
||||
Assert.That(_calculator.Add(1, 2), Is.EqualTo(3));
|
||||
|
||||
|
||||
We can check that our substitute received a call, and did not receive others:
|
||||
|
||||
|
||||
_calculator.Add(1, 2);
|
||||
_calculator.Received().Add(1, 2);
|
||||
_calculator.DidNotReceive().Add(5, 7);
|
||||
|
||||
|
||||
If our Received() assertion fails, NSubstitute tries to give us some help as to what the problem might be:
|
||||
|
||||
|
||||
NSubstitute.Exceptions.ReceivedCallsException : Expected to receive a call matching:
|
||||
Add(1, 2)
|
||||
Actually received no matching calls.
|
||||
Received 2 non-matching calls (non-matching arguments indicated with '*' characters):
|
||||
Add(1, *5*)
|
||||
Add(*4*, *7*)
|
||||
|
||||
We can also work with properties using the Returns syntax we use for methods, or just stick with plain old property setters (for read/write properties):
|
||||
|
||||
|
||||
_calculator.Mode.Returns("DEC");
|
||||
Assert.That(_calculator.Mode, Is.EqualTo("DEC"));
|
||||
|
||||
_calculator.Mode = "HEX";
|
||||
Assert.That(_calculator.Mode, Is.EqualTo("HEX"));
|
||||
|
||||
|
||||
NSubstitute supports argument matching for setting return values and asserting a call was received:
|
||||
|
||||
|
||||
_calculator.Add(10, -5);
|
||||
_calculator.Received().Add(10, Arg.Any<int>());
|
||||
_calculator.Received().Add(10, Arg.Is<int>(x => x < 0));
|
||||
|
||||
|
||||
We can use argument matching as well as passing a function to Returns() to get some more behaviour out of our substitute (possibly too much, but that's your call):
|
||||
|
||||
|
||||
_calculator
|
||||
.Add(Arg.Any<int>(), Arg.Any<int>())
|
||||
.Returns(x => (int)x[0] + (int)x[1]);
|
||||
Assert.That(_calculator.Add(5, 10), Is.EqualTo(15));
|
||||
|
||||
|
||||
Returns() can also be called with multiple arguments to set up a sequence of return values.
|
||||
|
||||
|
||||
_calculator.Mode.Returns("HEX", "DEC", "BIN");
|
||||
Assert.That(_calculator.Mode, Is.EqualTo("HEX"));
|
||||
Assert.That(_calculator.Mode, Is.EqualTo("DEC"));
|
||||
Assert.That(_calculator.Mode, Is.EqualTo("BIN"));
|
||||
|
||||
|
||||
Finally, we can raise events on our substitutes (unfortunately C# dramatically restricts the extent to which this syntax can be cleaned up):
|
||||
|
||||
|
||||
bool eventWasRaised = false;
|
||||
_calculator.PoweringUp += () => eventWasRaised = true;
|
||||
|
||||
_calculator.PoweringUp += Raise.Event<Action>();
|
||||
Assert.That(eventWasRaised);
|
||||
|
||||
|
||||
### Building
|
||||
|
||||
If you have Visual Studio 2008, 2010, 2012, 2013, or 2015 you should be able to compile NSubstitute and run the unit tests using the NUnit GUI or console test runner (see the ThirdParty directory). Note that some tests are marked `[Pending]` and are not meant to pass at present, so it is a good idea to exclude tests in the Pending category from test runs.
|
||||
To do full builds you'll also need Ruby, as the jekyll gem is used to generate the website.
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
The aim of this file is to acknowledge the software projects that have been used to create NSubstitute, particularly those distributed as Open Source Software. They have been invaluable in helping us produce this software.
|
||||
|
||||
# Software distributed with/compiled into NSubstitute
|
||||
|
||||
## Castle.Core
|
||||
NSubstitute is built on the Castle.Core library, particularly Castle.DynamicProxy which is used for generating proxies for types and intercepting calls made to them so that NSubstitute can record them.
|
||||
|
||||
Castle.Core is maintained by the Castle Project [http://www.castleproject.org/] and is released under the Apache License, Version 2.0 [http://www.apache.org/licenses/LICENSE-2.0.html].
|
||||
|
||||
# Software used to help build NSubstitute
|
||||
|
||||
## NUnit [http://www.nunit.org/]
|
||||
NUnit is used for coding and running unit and integration tests for NSubstitute. It is distributed under an open source zlib/libpng based license [http://www.opensource.org/licenses/zlib-license.html].
|
||||
|
||||
## Rhino Mocks [http://www.ayende.com/projects/rhino-mocks.aspx]
|
||||
Used for mocking parts of the NSubstitute mocking framework for testing. It is distributed under the BSD license [http://www.opensource.org/licenses/bsd-license.php].
|
||||
|
||||
## Moq [http://moq.me/]
|
||||
Moq is not used in NSubstitute, but was a great source of inspiration. Moq pioneered Arrange-Act-Assert (AAA) mocking syntax for .NET, as well as removing the distinction between mocks and stubs, both of which have become important parts of NSubstitute. Moq is available under the BSD license [http://www.opensource.org/licenses/bsd-license.php].
|
||||
|
||||
## NuPack [http://nupack.codeplex.com/]
|
||||
Used for packaging NSubstitute for distribution as a nu package. Distributed under the Apache License, Version 2.0 [http://www.apache.org/licenses/LICENSE-2.0.html].
|
||||
|
||||
## Jekyll [http://jekyllrb.com/]
|
||||
Static website generator written in Ruby, used for NSubstitute's website and documentation. Distributed under the MIT license [http://www.opensource.org/licenses/bsd-license.php].
|
||||
|
||||
## SyntaxHighlighter [http://alexgorbatchev.com/SyntaxHighlighter/]
|
||||
Open source, JavaScript, client-side code highlighter used for highlighting code samples on the NSubstitute website. Distributed under the MIT License [http://en.wikipedia.org/wiki/MIT_License] and the GPL [http://www.gnu.org/copyleft/lesser.html].
|
||||
|
||||
## FAKE [http://fsharp.github.io/FAKE/]
|
||||
FAKE (F# Make) is used for NSubstitute's build. It is inspired by `make` and `rake`. FAKE is distributed under a dual Apache 2 / MS-PL license [https://github.com/fsharp/FAKE/blob/master/License.txt].
|
||||
|
||||
## Microsoft .NET Framework [http://www.microsoft.com/net/]
|
||||
NSubstitute is coded in C# and compiled using Microsoft .NET. It can also run and compile under Mono [http://www.mono-project.com], an open source implementation of the open .NET standards for C# and the CLI.
|
||||
|
||||
Microsoft's .NET Framework is available under a EULA (and possibly other licenses like MS Reference Source License).
|
||||
Mono is available under four open source licenses for different parts of the project (including MIT/X11, GPL, MS-Pl). These are described on the project site [http://www.mono-project.com/Licensing].
|
||||
|
||||
## Microsoft Ilmerge [http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx]
|
||||
Used for combining assemblies so NSubstitute can be distributed as a single DLL. Available for use under a EULA as described on the ilmerge site.
|
||||
|
||||
## Microsoft Reactive Extensions for .NET (Rx) [http://msdn.microsoft.com/en-us/devlabs/ee794896]
|
||||
Used to provide .NET 3.5 with some of the neat concurrency helper classes that ship with out of the box with .NET 4.0. Distributed under a EULA [http://msdn.microsoft.com/en-us/devlabs/ff394099].
|
||||
|
||||
## 7-Zip [http://www.7-zip.org/]
|
||||
7-zip is used to ZIP up NSubstitute distributions as part of the automated build process. Distributed under a mixed GNU LGPL / unRAR licence [http://www.7-zip.org/license.txt].
|
||||
|
||||
# Other acknowledgements
|
||||
|
||||
## Software developers
|
||||
Yes, you! To everyone who has tried to get better at the craft and science of programming, especially those of you who have talked, tweeted, blogged, screencasted, and/or contributed software or ideas to the community.
|
||||
|
||||
No software developers were harmed to any significant extent during the production of NSubstitute, although some had to get by on reduced sleep.
|
||||
|
||||
@@ -1,719 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>NSubstitute</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:NSubstitute.Arg">
|
||||
<summary>
|
||||
Argument matchers used for specifying calls to substitutes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Any``1">
|
||||
<summary>
|
||||
Match any argument value compatible with type <typeparamref name="T"/>.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Is``1(``0)">
|
||||
<summary>
|
||||
Match argument that is equal to <paramref name="value"/>.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Is``1(System.Linq.Expressions.Expression{System.Predicate{``0}})">
|
||||
<summary>
|
||||
Match argument that satisfies <paramref name="predicate"/>.
|
||||
If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="predicate"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action"/> argument whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``1(``0)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`1"/> argument with specified argument whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="arg"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``2(``0,``1)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`2"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``3(``0,``1,``2)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`3"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<typeparam name="T3"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<param name="arg3"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``4(``0,``1,``2,``3)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`4"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<typeparam name="T3"></typeparam>
|
||||
<typeparam name="T4"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<param name="arg3"></param>
|
||||
<param name="arg4"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.InvokeDelegate``1(System.Object[])">
|
||||
<summary>
|
||||
Invoke any <typeparamref name="TDelegate"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="TDelegate"></typeparam>
|
||||
<param name="arguments">Arguments to pass to delegate.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Do``1(System.Action{``0})">
|
||||
<summary>
|
||||
Capture any argument compatible with type <typeparamref name="T"/> and use it to call the <paramref name="useArgument"/> function
|
||||
whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="useArgument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Callback">
|
||||
<summary>
|
||||
Perform this chain of callbacks and/or always callback when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.First(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform as first in chain of callback when called.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.Always(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action always when callback is called.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.FirstThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function as first callback in chain of callback when called.
|
||||
</summary>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.FirstThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception as first callback in chain of callback when called.
|
||||
</summary>
|
||||
<param name="exception"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.AlwaysThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function always when callback is called.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception.</typeparam>
|
||||
<param name="throwThis">The throw this.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.AlwaysThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception always when callback is called.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception.</typeparam>
|
||||
<param name="exception">The exception.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.EndCallbackChain.AndAlways(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform the given action for every call.
|
||||
</summary>
|
||||
<param name="doThis">The action to perform for every call</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.Then(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action once in chain of called callbacks.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepDoing(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Keep doing this action after the other callbacks have run.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Keep throwing this exception after the other callbacks have run.
|
||||
</summary>
|
||||
<typeparam name="TException"></typeparam>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(``0)">
|
||||
<summary>
|
||||
Keep throwing this exception after the other callbacks have run.
|
||||
</summary>
|
||||
<typeparam name="TException"></typeparam>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function once when called in a chain of callbacks.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception</typeparam>
|
||||
<param name="throwThis">Produce the exception to throw for a CallInfo</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception once when called in a chain of callbacks.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception</typeparam>
|
||||
<param name="exception">The exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher">
|
||||
<summary>
|
||||
Provides a specification for arguments for use with <see ctype="Arg.Matches (IArgumentMatcher)" />.
|
||||
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher.IsSatisfiedBy(System.Object)">
|
||||
<summary>
|
||||
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||
If this throws an exception the argument will be treated as non-matching.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.IDescribeNonMatches.DescribeFor(System.Object)">
|
||||
<summary>
|
||||
Describes how the <paramref name="argument"/> does not match the condition specified by this class, or <see cref="F:System.String.Empty"/>
|
||||
if a detailed description can not be provided for the argument.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns>Description of the non-match, or <see cref="F:System.String.Empty"/> if no description can be provided.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.ConfiguredCall.AndDoes(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Adds a callback to execute for matching calls.
|
||||
</summary>
|
||||
<param name="action">an action to call</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.Zip``3(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``1},System.Func{``0,``1,``2})">
|
||||
<summary>
|
||||
Combines two enumerables into a new enumerable using the given selector.
|
||||
</summary>
|
||||
<typeparam name="TFirst"></typeparam>
|
||||
<typeparam name="TSecond"></typeparam>
|
||||
<typeparam name="TResult"></typeparam>
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<param name="selector"></param>
|
||||
<returns></returns>
|
||||
<remarks>
|
||||
This implementation was sanity-checked against the
|
||||
<a href="http://msmvps.com/blogs/jon_skeet/archive/2011/01/14/reimplementing-linq-to-objects-part-35-zip.aspx">Edulinq implementation</a> and
|
||||
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/05/07/zip-me-up.aspx">Eric Lippert's implementation</a>.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.IsCompatibleWith(System.Object,System.Type)">
|
||||
<summary>
|
||||
Checks if the instance can be used when a <paramref name="type"/> is expected.
|
||||
</summary>
|
||||
<param name="instance"></param>
|
||||
<param name="type"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.Join(System.Collections.Generic.IEnumerable{System.String},System.String)">
|
||||
<summary>
|
||||
Join the <paramref name="strings"/> using <paramref name="seperator"/>.
|
||||
</summary>
|
||||
<param name="strings"></param>
|
||||
<param name="seperator"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Maybe`1">
|
||||
<summary>
|
||||
Particularly poor implementation of Maybe/Option type.
|
||||
This is just filling an immediate need; use FSharpOption or XSharpx or similar for a
|
||||
real implementation.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.RobustThreadLocal`1">
|
||||
<summary>
|
||||
Delegates to ThreadLocal<T>, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions.
|
||||
These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll
|
||||
just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway).
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="F:NSubstitute.Core.SubstituteConfig.OverrideAllCalls">
|
||||
<summary>
|
||||
Standard substitute behaviour; replace all calls with substituted behaviour.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NSubstitute.Core.SubstituteConfig.CallBaseByDefault">
|
||||
<summary>
|
||||
Partial substitute; use base behaviour unless explicitly overriden.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Exception)">
|
||||
<summary>
|
||||
Throw an exception for this call.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="ex">Exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws``1(System.Object)">
|
||||
<summary>
|
||||
Throw an exception of the given type for this call.
|
||||
</summary>
|
||||
<typeparam name="TException">Type of exception to throw</typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throw an exception for this call, as generated by the specified function.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="createException">Func creating exception object</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Exception)">
|
||||
<summary>
|
||||
Throw an exception for this call made with any arguments.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="ex">Exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs``1(System.Object)">
|
||||
<summary>
|
||||
Throws an exception of the given type for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="TException">Type of exception to throw</typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throws an exception for this call made with any arguments, as generated by the specified function.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="createException">Func creating exception object</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Experimental.Received.InOrder(System.Action)">
|
||||
<summary>
|
||||
*EXPERIMENTAL* Asserts the calls to the substitutes contained in the given Action were
|
||||
received by these substitutes in the same order. Calls to property getters are not included
|
||||
in the assertion.
|
||||
</summary>
|
||||
<param name="calls">Action containing calls to substitutes in the expected order</param>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher`1">
|
||||
<summary>
|
||||
Provides a specification for arguments for use with <see ctype="Arg.Matches < T >(IArgumentMatcher)" />.
|
||||
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||
</summary>
|
||||
<typeparam name="T">Matches arguments of type <typeparamref name="T"/> or compatible type.</typeparam>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher`1.IsSatisfiedBy(`0)">
|
||||
<summary>
|
||||
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||
If this throws an exception the argument will be treated as non-matching.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,``0)">
|
||||
<summary>
|
||||
Configure default return value for all methods that return the specified type
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name = "substitute"></param>
|
||||
<param name="returnThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Configure default return value for all methods that return the specified type, calculated by a function
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="returnThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Received.InOrder(System.Action)">
|
||||
<summary>
|
||||
Asserts the calls to the substitutes contained in the given Action were
|
||||
received by these substitutes in the same order. Calls to property getters are not included
|
||||
in the assertion.
|
||||
</summary>
|
||||
<param name="calls">Action containing calls to substitutes in the expected order</param>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Routing.Handlers.ClearLastCallRouterHandler">
|
||||
<summary>
|
||||
Clears last call router on SubstitutionContext for routes that do not require it.
|
||||
</summary>
|
||||
<remarks>
|
||||
This is to help prevent static state bleeding over into future calls.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.Args">
|
||||
<summary>
|
||||
Get the arguments passed to this call.
|
||||
</summary>
|
||||
<returns>Array of all arguments passed to this call</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.ArgTypes">
|
||||
<summary>
|
||||
Gets the types of all the arguments passed to this call.
|
||||
</summary>
|
||||
<returns>Array of types of all arguments passed to this call</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.Arg``1">
|
||||
<summary>
|
||||
Gets the argument of type `T` passed to this call. This will throw if there are no arguments
|
||||
of this type, or if there is more than one matching argument.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the argument to retrieve</typeparam>
|
||||
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.ArgAt``1(System.Int32)">
|
||||
<summary>
|
||||
Gets the argument passed to this call at the specified position converted to type `T`.
|
||||
This will throw if there are no arguments, if the argument is out of range or if it
|
||||
cannot be converted to the specified type.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the argument to retrieve</typeparam>
|
||||
<param name="position"></param>
|
||||
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
|
||||
</member>
|
||||
<member name="P:NSubstitute.Core.CallInfo.Item(System.Int32)">
|
||||
<summary>
|
||||
Gets the nth argument to this call.
|
||||
</summary>
|
||||
<param name="index">Index of argument</param>
|
||||
<returns>The value of the argument at the given index</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1(System.Object,``0)">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<TEventArgs></c> event with the provided <paramref name="sender"/> and <paramref name="eventArgs"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1(``0)">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<TEventArgs></c> event with the substitute as the sender and the provided <paramref name="eventArgs" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<EventArgsT></c> event with the substitute as the sender
|
||||
and with a default instance of <typeparamref name="TEventArgs" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.Event">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler</c> or <c>EventHandler<EventArgs></c> event with the substitute
|
||||
as the sender and with empty <c>EventArgs</c>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.Event``1(System.Object[])">
|
||||
<summary>
|
||||
Raise an event of type <typeparamref name="THandler" /> with the provided arguments. If no arguments are provided
|
||||
NSubstitute will try to provide reasonable defaults.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Substitute">
|
||||
<summary>
|
||||
Create a substitute for one or more types. For example: <c>Substitute.For<ISomeType>()</c>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``1(System.Object[])">
|
||||
<summary>
|
||||
Substitute for an interface or class.
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T">The type of interface or class to substitute.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute for the interface or class.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``2(System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified.</para>
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
|
||||
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute of type T1, that also implements T2.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``3(System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
|
||||
If additional interfaces are required use the <see cref="M:NSubstitute.Substitute.For(System.Type[],System.Object[])"/> overload.
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
|
||||
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<typeparam name="T3">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute of type T1, that also implements T2 and T3.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<param name="typesToProxy">The types of interfaces or a type of class and multiple interfaces the substitute should implement.</param>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute implementing the specified types.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.ForPartsOf``1(System.Object[])">
|
||||
<summary>
|
||||
Create a substitute for a class that behaves just like a real instance of the class, but also
|
||||
records calls made to its virtual members and allows for specific members to be substituted
|
||||
by using <see cref="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">When(() => call).DoNotCallBase()</see> or by
|
||||
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">setting a value to return value</see> for that member.
|
||||
</summary>
|
||||
<typeparam name="T">The type to substitute for parts of. Must be a class; not a delegate or interface.</typeparam>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns>An instance of the class that will execute real methods when called, but allows parts to be selectively
|
||||
overridden via `Returns` and `When..DoNotCallBase`.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call, calculated by the provided function.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments, calculated by the provided function.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0,System.Int32)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call the required number of times.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="requiredNumberOfCalls"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceive``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has not received the following call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0,System.Int32)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call with any arguments the required number of times.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="requiredNumberOfCalls"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceiveWithAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has not received the following call with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ClearReceivedCalls``1(``0)">
|
||||
<summary>
|
||||
Forget all the calls this substitute has received.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<remarks>
|
||||
Note that this will not clear any results set up for the substitute using Returns().
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.When``1(``0,System.Action{``0})">
|
||||
<summary>
|
||||
Perform an action when this member is called.
|
||||
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="substituteCall"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.WhenForAnyArgs``1(``0,System.Action{``0})">
|
||||
<summary>
|
||||
Perform an action when this member is called with any arguments.
|
||||
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="substituteCall"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedCalls``1(``0)">
|
||||
<summary>
|
||||
Returns the calls received by this substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.SubstituteFactory.Create(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
Create a substitute for the given types.
|
||||
</summary>
|
||||
<param name="typesToProxy"></param>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.SubstituteFactory.CreatePartial(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
Create an instance of the given types, with calls configured to call the base implementation
|
||||
where possible. Parts of the instance can be substituted using
|
||||
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">Returns()</see>.
|
||||
</summary>
|
||||
<param name="typesToProxy"></param>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action when called.
|
||||
</summary>
|
||||
<param name="callbackWithArguments"></param>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Do(NSubstitute.Callback)">
|
||||
<summary>
|
||||
Perform this configured callcback when called.
|
||||
</summary>
|
||||
<param name="callback"></param>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">
|
||||
<summary>
|
||||
Do not call the base implementation on future calls. For use with partial substitutes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Exception)">
|
||||
<summary>
|
||||
Throw the specified exception when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw``1">
|
||||
<summary>
|
||||
Throw an exception of the given type when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throw an exception generated by the specified function when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNull``1(``0)">
|
||||
<summary>
|
||||
Set null as returned value for this call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNullForAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Set null as returned value for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
@@ -1,759 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>NSubstitute</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:NSubstitute.Arg">
|
||||
<summary>
|
||||
Argument matchers used for specifying calls to substitutes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Any``1">
|
||||
<summary>
|
||||
Match any argument value compatible with type <typeparamref name="T"/>.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Is``1(``0)">
|
||||
<summary>
|
||||
Match argument that is equal to <paramref name="value"/>.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Is``1(System.Linq.Expressions.Expression{System.Predicate{``0}})">
|
||||
<summary>
|
||||
Match argument that satisfies <paramref name="predicate"/>.
|
||||
If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="predicate"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action"/> argument whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``1(``0)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`1"/> argument with specified argument whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="arg"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``2(``0,``1)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`2"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``3(``0,``1,``2)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`3"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<typeparam name="T3"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<param name="arg3"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``4(``0,``1,``2,``3)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`4"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<typeparam name="T3"></typeparam>
|
||||
<typeparam name="T4"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<param name="arg3"></param>
|
||||
<param name="arg4"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.InvokeDelegate``1(System.Object[])">
|
||||
<summary>
|
||||
Invoke any <typeparamref name="TDelegate"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="TDelegate"></typeparam>
|
||||
<param name="arguments">Arguments to pass to delegate.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Do``1(System.Action{``0})">
|
||||
<summary>
|
||||
Capture any argument compatible with type <typeparamref name="T"/> and use it to call the <paramref name="useArgument"/> function
|
||||
whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="useArgument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Callback">
|
||||
<summary>
|
||||
Perform this chain of callbacks and/or always callback when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.First(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform as first in chain of callback when called.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.Always(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action always when callback is called.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.FirstThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function as first callback in chain of callback when called.
|
||||
</summary>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.FirstThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception as first callback in chain of callback when called.
|
||||
</summary>
|
||||
<param name="exception"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.AlwaysThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function always when callback is called.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception.</typeparam>
|
||||
<param name="throwThis">The throw this.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.AlwaysThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception always when callback is called.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception.</typeparam>
|
||||
<param name="exception">The exception.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.EndCallbackChain.AndAlways(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform the given action for every call.
|
||||
</summary>
|
||||
<param name="doThis">The action to perform for every call</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.Then(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action once in chain of called callbacks.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepDoing(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Keep doing this action after the other callbacks have run.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Keep throwing this exception after the other callbacks have run.
|
||||
</summary>
|
||||
<typeparam name="TException"></typeparam>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(``0)">
|
||||
<summary>
|
||||
Keep throwing this exception after the other callbacks have run.
|
||||
</summary>
|
||||
<typeparam name="TException"></typeparam>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function once when called in a chain of callbacks.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception</typeparam>
|
||||
<param name="throwThis">Produce the exception to throw for a CallInfo</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception once when called in a chain of callbacks.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception</typeparam>
|
||||
<param name="exception">The exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher">
|
||||
<summary>
|
||||
Provides a specification for arguments for use with <see ctype="Arg.Matches (IArgumentMatcher)" />.
|
||||
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher.IsSatisfiedBy(System.Object)">
|
||||
<summary>
|
||||
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||
If this throws an exception the argument will be treated as non-matching.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.IDescribeNonMatches.DescribeFor(System.Object)">
|
||||
<summary>
|
||||
Describes how the <paramref name="argument"/> does not match the condition specified by this class, or <see cref="F:System.String.Empty"/>
|
||||
if a detailed description can not be provided for the argument.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns>Description of the non-match, or <see cref="F:System.String.Empty"/> if no description can be provided.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.ConfiguredCall.AndDoes(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Adds a callback to execute for matching calls.
|
||||
</summary>
|
||||
<param name="action">an action to call</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.Zip``3(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``1},System.Func{``0,``1,``2})">
|
||||
<summary>
|
||||
Combines two enumerables into a new enumerable using the given selector.
|
||||
</summary>
|
||||
<typeparam name="TFirst"></typeparam>
|
||||
<typeparam name="TSecond"></typeparam>
|
||||
<typeparam name="TResult"></typeparam>
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<param name="selector"></param>
|
||||
<returns></returns>
|
||||
<remarks>
|
||||
This implementation was sanity-checked against the
|
||||
<a href="http://msmvps.com/blogs/jon_skeet/archive/2011/01/14/reimplementing-linq-to-objects-part-35-zip.aspx">Edulinq implementation</a> and
|
||||
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/05/07/zip-me-up.aspx">Eric Lippert's implementation</a>.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.IsCompatibleWith(System.Object,System.Type)">
|
||||
<summary>
|
||||
Checks if the instance can be used when a <paramref name="type"/> is expected.
|
||||
</summary>
|
||||
<param name="instance"></param>
|
||||
<param name="type"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.Join(System.Collections.Generic.IEnumerable{System.String},System.String)">
|
||||
<summary>
|
||||
Join the <paramref name="strings"/> using <paramref name="seperator"/>.
|
||||
</summary>
|
||||
<param name="strings"></param>
|
||||
<param name="seperator"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Maybe`1">
|
||||
<summary>
|
||||
Particularly poor implementation of Maybe/Option type.
|
||||
This is just filling an immediate need; use FSharpOption or XSharpx or similar for a
|
||||
real implementation.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.RobustThreadLocal`1">
|
||||
<summary>
|
||||
Delegates to ThreadLocal<T>, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions.
|
||||
These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll
|
||||
just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway).
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="F:NSubstitute.Core.SubstituteConfig.OverrideAllCalls">
|
||||
<summary>
|
||||
Standard substitute behaviour; replace all calls with substituted behaviour.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NSubstitute.Core.SubstituteConfig.CallBaseByDefault">
|
||||
<summary>
|
||||
Partial substitute; use base behaviour unless explicitly overriden.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Exception)">
|
||||
<summary>
|
||||
Throw an exception for this call.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="ex">Exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws``1(System.Object)">
|
||||
<summary>
|
||||
Throw an exception of the given type for this call.
|
||||
</summary>
|
||||
<typeparam name="TException">Type of exception to throw</typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throw an exception for this call, as generated by the specified function.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="createException">Func creating exception object</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Exception)">
|
||||
<summary>
|
||||
Throw an exception for this call made with any arguments.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="ex">Exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs``1(System.Object)">
|
||||
<summary>
|
||||
Throws an exception of the given type for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="TException">Type of exception to throw</typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throws an exception for this call made with any arguments, as generated by the specified function.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="createException">Func creating exception object</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Experimental.Received.InOrder(System.Action)">
|
||||
<summary>
|
||||
*EXPERIMENTAL* Asserts the calls to the substitutes contained in the given Action were
|
||||
received by these substitutes in the same order. Calls to property getters are not included
|
||||
in the assertion.
|
||||
</summary>
|
||||
<param name="calls">Action containing calls to substitutes in the expected order</param>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher`1">
|
||||
<summary>
|
||||
Provides a specification for arguments for use with <see ctype="Arg.Matches < T >(IArgumentMatcher)" />.
|
||||
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||
</summary>
|
||||
<typeparam name="T">Matches arguments of type <typeparamref name="T"/> or compatible type.</typeparam>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher`1.IsSatisfiedBy(`0)">
|
||||
<summary>
|
||||
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||
If this throws an exception the argument will be treated as non-matching.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,``0)">
|
||||
<summary>
|
||||
Configure default return value for all methods that return the specified type
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name = "substitute"></param>
|
||||
<param name="returnThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Configure default return value for all methods that return the specified type, calculated by a function
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="returnThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Received.InOrder(System.Action)">
|
||||
<summary>
|
||||
Asserts the calls to the substitutes contained in the given Action were
|
||||
received by these substitutes in the same order. Calls to property getters are not included
|
||||
in the assertion.
|
||||
</summary>
|
||||
<param name="calls">Action containing calls to substitutes in the expected order</param>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Routing.Handlers.ClearLastCallRouterHandler">
|
||||
<summary>
|
||||
Clears last call router on SubstitutionContext for routes that do not require it.
|
||||
</summary>
|
||||
<remarks>
|
||||
This is to help prevent static state bleeding over into future calls.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.Args">
|
||||
<summary>
|
||||
Get the arguments passed to this call.
|
||||
</summary>
|
||||
<returns>Array of all arguments passed to this call</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.ArgTypes">
|
||||
<summary>
|
||||
Gets the types of all the arguments passed to this call.
|
||||
</summary>
|
||||
<returns>Array of types of all arguments passed to this call</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.Arg``1">
|
||||
<summary>
|
||||
Gets the argument of type `T` passed to this call. This will throw if there are no arguments
|
||||
of this type, or if there is more than one matching argument.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the argument to retrieve</typeparam>
|
||||
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.ArgAt``1(System.Int32)">
|
||||
<summary>
|
||||
Gets the argument passed to this call at the specified position converted to type `T`.
|
||||
This will throw if there are no arguments, if the argument is out of range or if it
|
||||
cannot be converted to the specified type.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the argument to retrieve</typeparam>
|
||||
<param name="position"></param>
|
||||
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
|
||||
</member>
|
||||
<member name="P:NSubstitute.Core.CallInfo.Item(System.Int32)">
|
||||
<summary>
|
||||
Gets the nth argument to this call.
|
||||
</summary>
|
||||
<param name="index">Index of argument</param>
|
||||
<returns>The value of the argument at the given index</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1(System.Object,``0)">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<TEventArgs></c> event with the provided <paramref name="sender"/> and <paramref name="eventArgs"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1(``0)">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<TEventArgs></c> event with the substitute as the sender and the provided <paramref name="eventArgs" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<EventArgsT></c> event with the substitute as the sender
|
||||
and with a default instance of <typeparamref name="TEventArgs" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.Event">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler</c> or <c>EventHandler<EventArgs></c> event with the substitute
|
||||
as the sender and with empty <c>EventArgs</c>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.Event``1(System.Object[])">
|
||||
<summary>
|
||||
Raise an event of type <typeparamref name="THandler" /> with the provided arguments. If no arguments are provided
|
||||
NSubstitute will try to provide reasonable defaults.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Substitute">
|
||||
<summary>
|
||||
Create a substitute for one or more types. For example: <c>Substitute.For<ISomeType>()</c>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``1(System.Object[])">
|
||||
<summary>
|
||||
Substitute for an interface or class.
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T">The type of interface or class to substitute.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute for the interface or class.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``2(System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified.</para>
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
|
||||
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute of type T1, that also implements T2.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``3(System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
|
||||
If additional interfaces are required use the <see cref="M:NSubstitute.Substitute.For(System.Type[],System.Object[])"/> overload.
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
|
||||
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<typeparam name="T3">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute of type T1, that also implements T2 and T3.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<param name="typesToProxy">The types of interfaces or a type of class and multiple interfaces the substitute should implement.</param>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute implementing the specified types.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.ForPartsOf``1(System.Object[])">
|
||||
<summary>
|
||||
Create a substitute for a class that behaves just like a real instance of the class, but also
|
||||
records calls made to its virtual members and allows for specific members to be substituted
|
||||
by using <see cref="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">When(() => call).DoNotCallBase()</see> or by
|
||||
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">setting a value to return value</see> for that member.
|
||||
</summary>
|
||||
<typeparam name="T">The type to substitute for parts of. Must be a class; not a delegate or interface.</typeparam>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns>An instance of the class that will execute real methods when called, but allows parts to be selectively
|
||||
overridden via `Returns` and `When..DoNotCallBase`.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call, calculated by the provided function.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return. Will be wrapped in a Task</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments, calculated by the provided function.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0,System.Int32)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call the required number of times.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="requiredNumberOfCalls"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceive``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has not received the following call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0,System.Int32)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call with any arguments the required number of times.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="requiredNumberOfCalls"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceiveWithAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has not received the following call with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ClearReceivedCalls``1(``0)">
|
||||
<summary>
|
||||
Forget all the calls this substitute has received.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<remarks>
|
||||
Note that this will not clear any results set up for the substitute using Returns().
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.When``1(``0,System.Action{``0})">
|
||||
<summary>
|
||||
Perform an action when this member is called.
|
||||
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="substituteCall"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.WhenForAnyArgs``1(``0,System.Action{``0})">
|
||||
<summary>
|
||||
Perform an action when this member is called with any arguments.
|
||||
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="substituteCall"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedCalls``1(``0)">
|
||||
<summary>
|
||||
Returns the calls received by this substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.SubstituteFactory.Create(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
Create a substitute for the given types.
|
||||
</summary>
|
||||
<param name="typesToProxy"></param>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.SubstituteFactory.CreatePartial(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
Create an instance of the given types, with calls configured to call the base implementation
|
||||
where possible. Parts of the instance can be substituted using
|
||||
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">Returns()</see>.
|
||||
</summary>
|
||||
<param name="typesToProxy"></param>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action when called.
|
||||
</summary>
|
||||
<param name="callbackWithArguments"></param>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Do(NSubstitute.Callback)">
|
||||
<summary>
|
||||
Perform this configured callcback when called.
|
||||
</summary>
|
||||
<param name="callback"></param>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">
|
||||
<summary>
|
||||
Do not call the base implementation on future calls. For use with partial substitutes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Exception)">
|
||||
<summary>
|
||||
Throw the specified exception when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw``1">
|
||||
<summary>
|
||||
Throw an exception of the given type when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throw an exception generated by the specified function when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNull``1(``0)">
|
||||
<summary>
|
||||
Set null as returned value for this call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNullForAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Set null as returned value for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
@@ -1,759 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>NSubstitute</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:NSubstitute.Arg">
|
||||
<summary>
|
||||
Argument matchers used for specifying calls to substitutes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Any``1">
|
||||
<summary>
|
||||
Match any argument value compatible with type <typeparamref name="T"/>.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Is``1(``0)">
|
||||
<summary>
|
||||
Match argument that is equal to <paramref name="value"/>.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Is``1(System.Linq.Expressions.Expression{System.Predicate{``0}})">
|
||||
<summary>
|
||||
Match argument that satisfies <paramref name="predicate"/>.
|
||||
If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="predicate"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action"/> argument whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``1(``0)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`1"/> argument with specified argument whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="arg"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``2(``0,``1)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`2"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``3(``0,``1,``2)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`3"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<typeparam name="T3"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<param name="arg3"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Invoke``4(``0,``1,``2,``3)">
|
||||
<summary>
|
||||
Invoke any <see cref="T:System.Action`4"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T1"></typeparam>
|
||||
<typeparam name="T2"></typeparam>
|
||||
<typeparam name="T3"></typeparam>
|
||||
<typeparam name="T4"></typeparam>
|
||||
<param name="arg1"></param>
|
||||
<param name="arg2"></param>
|
||||
<param name="arg3"></param>
|
||||
<param name="arg4"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.InvokeDelegate``1(System.Object[])">
|
||||
<summary>
|
||||
Invoke any <typeparamref name="TDelegate"/> argument with specified arguments whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="TDelegate"></typeparam>
|
||||
<param name="arguments">Arguments to pass to delegate.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Arg.Do``1(System.Action{``0})">
|
||||
<summary>
|
||||
Capture any argument compatible with type <typeparamref name="T"/> and use it to call the <paramref name="useArgument"/> function
|
||||
whenever a matching call is made to the substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="useArgument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Callback">
|
||||
<summary>
|
||||
Perform this chain of callbacks and/or always callback when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.First(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform as first in chain of callback when called.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.Always(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action always when callback is called.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.FirstThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function as first callback in chain of callback when called.
|
||||
</summary>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.FirstThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception as first callback in chain of callback when called.
|
||||
</summary>
|
||||
<param name="exception"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.AlwaysThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function always when callback is called.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception.</typeparam>
|
||||
<param name="throwThis">The throw this.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callback.AlwaysThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception always when callback is called.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception.</typeparam>
|
||||
<param name="exception">The exception.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.EndCallbackChain.AndAlways(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform the given action for every call.
|
||||
</summary>
|
||||
<param name="doThis">The action to perform for every call</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.Then(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action once in chain of called callbacks.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepDoing(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Keep doing this action after the other callbacks have run.
|
||||
</summary>
|
||||
<param name="doThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Keep throwing this exception after the other callbacks have run.
|
||||
</summary>
|
||||
<typeparam name="TException"></typeparam>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(``0)">
|
||||
<summary>
|
||||
Keep throwing this exception after the other callbacks have run.
|
||||
</summary>
|
||||
<typeparam name="TException"></typeparam>
|
||||
<param name="throwThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Throw exception returned by function once when called in a chain of callbacks.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception</typeparam>
|
||||
<param name="throwThis">Produce the exception to throw for a CallInfo</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(``0)">
|
||||
<summary>
|
||||
Throw this exception once when called in a chain of callbacks.
|
||||
</summary>
|
||||
<typeparam name="TException">The type of the exception</typeparam>
|
||||
<param name="exception">The exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher">
|
||||
<summary>
|
||||
Provides a specification for arguments for use with <see ctype="Arg.Matches (IArgumentMatcher)" />.
|
||||
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher.IsSatisfiedBy(System.Object)">
|
||||
<summary>
|
||||
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||
If this throws an exception the argument will be treated as non-matching.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.IDescribeNonMatches.DescribeFor(System.Object)">
|
||||
<summary>
|
||||
Describes how the <paramref name="argument"/> does not match the condition specified by this class, or <see cref="F:System.String.Empty"/>
|
||||
if a detailed description can not be provided for the argument.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns>Description of the non-match, or <see cref="F:System.String.Empty"/> if no description can be provided.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.ConfiguredCall.AndDoes(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Adds a callback to execute for matching calls.
|
||||
</summary>
|
||||
<param name="action">an action to call</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.Zip``3(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``1},System.Func{``0,``1,``2})">
|
||||
<summary>
|
||||
Combines two enumerables into a new enumerable using the given selector.
|
||||
</summary>
|
||||
<typeparam name="TFirst"></typeparam>
|
||||
<typeparam name="TSecond"></typeparam>
|
||||
<typeparam name="TResult"></typeparam>
|
||||
<param name="first"></param>
|
||||
<param name="second"></param>
|
||||
<param name="selector"></param>
|
||||
<returns></returns>
|
||||
<remarks>
|
||||
This implementation was sanity-checked against the
|
||||
<a href="http://msmvps.com/blogs/jon_skeet/archive/2011/01/14/reimplementing-linq-to-objects-part-35-zip.aspx">Edulinq implementation</a> and
|
||||
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/05/07/zip-me-up.aspx">Eric Lippert's implementation</a>.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.IsCompatibleWith(System.Object,System.Type)">
|
||||
<summary>
|
||||
Checks if the instance can be used when a <paramref name="type"/> is expected.
|
||||
</summary>
|
||||
<param name="instance"></param>
|
||||
<param name="type"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Extensions.Join(System.Collections.Generic.IEnumerable{System.String},System.String)">
|
||||
<summary>
|
||||
Join the <paramref name="strings"/> using <paramref name="seperator"/>.
|
||||
</summary>
|
||||
<param name="strings"></param>
|
||||
<param name="seperator"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Maybe`1">
|
||||
<summary>
|
||||
Particularly poor implementation of Maybe/Option type.
|
||||
This is just filling an immediate need; use FSharpOption or XSharpx or similar for a
|
||||
real implementation.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.RobustThreadLocal`1">
|
||||
<summary>
|
||||
Delegates to ThreadLocal<T>, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions.
|
||||
These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll
|
||||
just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway).
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="F:NSubstitute.Core.SubstituteConfig.OverrideAllCalls">
|
||||
<summary>
|
||||
Standard substitute behaviour; replace all calls with substituted behaviour.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NSubstitute.Core.SubstituteConfig.CallBaseByDefault">
|
||||
<summary>
|
||||
Partial substitute; use base behaviour unless explicitly overriden.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Exception)">
|
||||
<summary>
|
||||
Throw an exception for this call.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="ex">Exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws``1(System.Object)">
|
||||
<summary>
|
||||
Throw an exception of the given type for this call.
|
||||
</summary>
|
||||
<typeparam name="TException">Type of exception to throw</typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throw an exception for this call, as generated by the specified function.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="createException">Func creating exception object</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Exception)">
|
||||
<summary>
|
||||
Throw an exception for this call made with any arguments.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="ex">Exception to throw</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs``1(System.Object)">
|
||||
<summary>
|
||||
Throws an exception of the given type for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="TException">Type of exception to throw</typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throws an exception for this call made with any arguments, as generated by the specified function.
|
||||
</summary>
|
||||
<param name="value"></param>
|
||||
<param name="createException">Func creating exception object</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Experimental.Received.InOrder(System.Action)">
|
||||
<summary>
|
||||
*EXPERIMENTAL* Asserts the calls to the substitutes contained in the given Action were
|
||||
received by these substitutes in the same order. Calls to property getters are not included
|
||||
in the assertion.
|
||||
</summary>
|
||||
<param name="calls">Action containing calls to substitutes in the expected order</param>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher`1">
|
||||
<summary>
|
||||
Provides a specification for arguments for use with <see ctype="Arg.Matches < T >(IArgumentMatcher)" />.
|
||||
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
|
||||
</summary>
|
||||
<typeparam name="T">Matches arguments of type <typeparamref name="T"/> or compatible type.</typeparam>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher`1.IsSatisfiedBy(`0)">
|
||||
<summary>
|
||||
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
|
||||
If this throws an exception the argument will be treated as non-matching.
|
||||
</summary>
|
||||
<param name="argument"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,``0)">
|
||||
<summary>
|
||||
Configure default return value for all methods that return the specified type
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name = "substitute"></param>
|
||||
<param name="returnThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,System.Func{NSubstitute.Core.CallInfo,``0})">
|
||||
<summary>
|
||||
Configure default return value for all methods that return the specified type, calculated by a function
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="returnThis"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Received.InOrder(System.Action)">
|
||||
<summary>
|
||||
Asserts the calls to the substitutes contained in the given Action were
|
||||
received by these substitutes in the same order. Calls to property getters are not included
|
||||
in the assertion.
|
||||
</summary>
|
||||
<param name="calls">Action containing calls to substitutes in the expected order</param>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Routing.Handlers.ClearLastCallRouterHandler">
|
||||
<summary>
|
||||
Clears last call router on SubstitutionContext for routes that do not require it.
|
||||
</summary>
|
||||
<remarks>
|
||||
This is to help prevent static state bleeding over into future calls.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.Args">
|
||||
<summary>
|
||||
Get the arguments passed to this call.
|
||||
</summary>
|
||||
<returns>Array of all arguments passed to this call</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.ArgTypes">
|
||||
<summary>
|
||||
Gets the types of all the arguments passed to this call.
|
||||
</summary>
|
||||
<returns>Array of types of all arguments passed to this call</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.Arg``1">
|
||||
<summary>
|
||||
Gets the argument of type `T` passed to this call. This will throw if there are no arguments
|
||||
of this type, or if there is more than one matching argument.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the argument to retrieve</typeparam>
|
||||
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.CallInfo.ArgAt``1(System.Int32)">
|
||||
<summary>
|
||||
Gets the argument passed to this call at the specified position converted to type `T`.
|
||||
This will throw if there are no arguments, if the argument is out of range or if it
|
||||
cannot be converted to the specified type.
|
||||
</summary>
|
||||
<typeparam name="T">The type of the argument to retrieve</typeparam>
|
||||
<param name="position"></param>
|
||||
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
|
||||
</member>
|
||||
<member name="P:NSubstitute.Core.CallInfo.Item(System.Int32)">
|
||||
<summary>
|
||||
Gets the nth argument to this call.
|
||||
</summary>
|
||||
<param name="index">Index of argument</param>
|
||||
<returns>The value of the argument at the given index</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1(System.Object,``0)">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<TEventArgs></c> event with the provided <paramref name="sender"/> and <paramref name="eventArgs"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1(``0)">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<TEventArgs></c> event with the substitute as the sender and the provided <paramref name="eventArgs" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.EventWith``1">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler<EventArgsT></c> event with the substitute as the sender
|
||||
and with a default instance of <typeparamref name="TEventArgs" />.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.Event">
|
||||
<summary>
|
||||
Raise an event for an <c>EventHandler</c> or <c>EventHandler<EventArgs></c> event with the substitute
|
||||
as the sender and with empty <c>EventArgs</c>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Raise.Event``1(System.Object[])">
|
||||
<summary>
|
||||
Raise an event of type <typeparamref name="THandler" /> with the provided arguments. If no arguments are provided
|
||||
NSubstitute will try to provide reasonable defaults.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NSubstitute.Substitute">
|
||||
<summary>
|
||||
Create a substitute for one or more types. For example: <c>Substitute.For<ISomeType>()</c>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``1(System.Object[])">
|
||||
<summary>
|
||||
Substitute for an interface or class.
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T">The type of interface or class to substitute.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute for the interface or class.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``2(System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified.</para>
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
|
||||
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute of type T1, that also implements T2.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For``3(System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
|
||||
If additional interfaces are required use the <see cref="M:NSubstitute.Substitute.For(System.Type[],System.Object[])"/> overload.
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
|
||||
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<typeparam name="T3">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute of type T1, that also implements T2 and T3.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.For(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
|
||||
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
|
||||
can be recorded or have return values specified.</para>
|
||||
</summary>
|
||||
<param name="typesToProxy">The types of interfaces or a type of class and multiple interfaces the substitute should implement.</param>
|
||||
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
|
||||
<returns>A substitute implementing the specified types.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Substitute.ForPartsOf``1(System.Object[])">
|
||||
<summary>
|
||||
Create a substitute for a class that behaves just like a real instance of the class, but also
|
||||
records calls made to its virtual members and allows for specific members to be substituted
|
||||
by using <see cref="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">When(() => call).DoNotCallBase()</see> or by
|
||||
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">setting a value to return value</see> for that member.
|
||||
</summary>
|
||||
<typeparam name="T">The type to substitute for parts of. Must be a class; not a delegate or interface.</typeparam>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns>An instance of the class that will execute real methods when called, but allows parts to be selectively
|
||||
overridden via `Returns` and `When..DoNotCallBase`.</returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call, calculated by the provided function.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return. Will be wrapped in a Task</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,``0,``0[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Value to return</param>
|
||||
<param name="returnThese">Optionally return these values next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
|
||||
<summary>
|
||||
Set a return value for this call made with any arguments, calculated by the provided function.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<param name="returnThis">Function to calculate the return value</param>
|
||||
<param name="returnThese">Optionally use these functions next</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0,System.Int32)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call the required number of times.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="requiredNumberOfCalls"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceive``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has not received the following call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0,System.Int32)">
|
||||
<summary>
|
||||
Checks this substitute has received the following call with any arguments the required number of times.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="requiredNumberOfCalls"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceiveWithAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Checks this substitute has not received the following call with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ClearReceivedCalls``1(``0)">
|
||||
<summary>
|
||||
Forget all the calls this substitute has received.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<remarks>
|
||||
Note that this will not clear any results set up for the substitute using Returns().
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.When``1(``0,System.Action{``0})">
|
||||
<summary>
|
||||
Perform an action when this member is called.
|
||||
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="substituteCall"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.WhenForAnyArgs``1(``0,System.Action{``0})">
|
||||
<summary>
|
||||
Perform an action when this member is called with any arguments.
|
||||
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<param name="substituteCall"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.SubstituteExtensions.ReceivedCalls``1(``0)">
|
||||
<summary>
|
||||
Returns the calls received by this substitute.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="substitute"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.SubstituteFactory.Create(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
Create a substitute for the given types.
|
||||
</summary>
|
||||
<param name="typesToProxy"></param>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.SubstituteFactory.CreatePartial(System.Type[],System.Object[])">
|
||||
<summary>
|
||||
Create an instance of the given types, with calls configured to call the base implementation
|
||||
where possible. Parts of the instance can be substituted using
|
||||
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">Returns()</see>.
|
||||
</summary>
|
||||
<param name="typesToProxy"></param>
|
||||
<param name="constructorArguments"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})">
|
||||
<summary>
|
||||
Perform this action when called.
|
||||
</summary>
|
||||
<param name="callbackWithArguments"></param>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Do(NSubstitute.Callback)">
|
||||
<summary>
|
||||
Perform this configured callcback when called.
|
||||
</summary>
|
||||
<param name="callback"></param>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">
|
||||
<summary>
|
||||
Do not call the base implementation on future calls. For use with partial substitutes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Exception)">
|
||||
<summary>
|
||||
Throw the specified exception when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw``1">
|
||||
<summary>
|
||||
Throw an exception of the given type when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Func{NSubstitute.Core.CallInfo,System.Exception})">
|
||||
<summary>
|
||||
Throw an exception generated by the specified function when called.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNull``1(``0)">
|
||||
<summary>
|
||||
Set null as returned value for this call.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNullForAnyArgs``1(``0)">
|
||||
<summary>
|
||||
Set null as returned value for this call made with any arguments.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Reference in New Issue
Block a user