mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge branch '644_target' into Multi-SSH
This commit is contained in:
@@ -1,3 +1,45 @@
|
||||
1.75.7011 (2017-11-07):
|
||||
|
||||
Fixes:
|
||||
------
|
||||
#778: Custom connection file path command line argument (/c) not working
|
||||
#763: Sometimes minimizing folder causes connection tree to disappear
|
||||
#761: Connections using external tools do not start (introduced in v1.75.7009)
|
||||
#758: "Decryption failed" message when loading from SQL server
|
||||
Fixed issues with /resetpanels and /resetpos command line arguments
|
||||
Resolved bug where connection tree hotkeys would sometimes be disabled
|
||||
|
||||
|
||||
1.75.7010 (2017-10-29):
|
||||
|
||||
Fixes:
|
||||
------
|
||||
#756: CustomConsPath always null
|
||||
|
||||
|
||||
1.75.7009 (2017-10-28):
|
||||
|
||||
Fixes:
|
||||
------
|
||||
#676: Portable version ignores /cons param on first run
|
||||
#675: Attempting to add new connection/folder does not work in some situations
|
||||
#665: Can not add new connection or new folder in some situations
|
||||
#658: Keep Port Scan tab open after import
|
||||
#646: Exception after click on import port scan
|
||||
#635: Updated PuTTYNG to 0.70
|
||||
#610: mRemoteNG cannot start /crashes for some users on Windows server 2012 R2 server
|
||||
#600: Missing horizontal scrollbar on Connections Panel
|
||||
#596: Exception when launching external tool without a connection selected
|
||||
#550: Sometimes double-clicking connection tree node began rename instead of connecting
|
||||
#536: Prevented log file creation when writeLogFile option is not set
|
||||
#529: Erratic Tree Selection when using SQL Database
|
||||
#482: Default connection password not decrypted when loaded
|
||||
#335: The Quick Connect Toolbar > Connection view does not show open connections with the play icon
|
||||
#176: Unable to enter text in Quick Connect when SSH connection active
|
||||
Minor error message correction
|
||||
Minor code refactoring
|
||||
|
||||
|
||||
NO.RELEASE (2017-06-15):
|
||||
|
||||
Fixed in previous releases:
|
||||
|
||||
@@ -11,7 +11,9 @@ Bennett Blodinger (github.com/benwa)
|
||||
Joe Cefoli (github.com/jcefoli)
|
||||
countchappy (github.com/countchappy)
|
||||
Tony Lambert
|
||||
|
||||
Brandon Wulf (github.com/mrwulf)
|
||||
Pedro Rodrigues (github.com/pedro2555)
|
||||
github.com/dekelMP
|
||||
|
||||
|
||||
Past Contributors
|
||||
|
||||
@@ -50,6 +50,11 @@ node('windows') {
|
||||
stage ('Run Unit Tests (Portable)') {
|
||||
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && VSTest.Console.exe /logger:trx /TestAdapterPath:${nunitTestAdapterPath} \"${jobDir}\\mRemoteNGTests\\bin\\Release Portable\\mRemoteNGTests.dll\""
|
||||
}
|
||||
|
||||
stage ('Generate UpdateCheck Files') {
|
||||
bat "powershell -ExecutionPolicy Bypass -File \"${jobDir}\\Tools\\create_upg_chk_files.ps1\" -TagName \"${env.TagName}\" -UpdateChannel \"${env.UpdateChannel}\""
|
||||
archiveArtifacts artifacts: "Release\\*.txt", caseSensitive: false, onlyIfSuccessful: true
|
||||
}
|
||||
|
||||
stage ('Publish to GitHub') {
|
||||
withCredentials([string(credentialsId: '5443a369-dbe8-42d3-b4e8-04d0b4e9039a', variable: 'GH_AUTH_TOKEN')]) {
|
||||
|
||||
@@ -1,42 +1,109 @@
|
||||
#Requires -Version 4.0
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TagName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("Stable","Beta","Development")]
|
||||
$UpdateChannel
|
||||
)
|
||||
|
||||
|
||||
|
||||
function New-MsiUpdateFileContent {
|
||||
param (
|
||||
[System.IO.FileInfo]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$MsiFile,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TagName
|
||||
)
|
||||
|
||||
$version = $MsiFile.BaseName -replace "[a-zA-Z-]*"
|
||||
$certThumbprint = (Get-AuthenticodeSignature -FilePath $MsiFile).SignerCertificate.Thumbprint
|
||||
$hash = Get-FileHash -Algorithm SHA512 $MsiFile | % { $_.Hash }
|
||||
|
||||
$fileContents = `
|
||||
"Version: $version
|
||||
dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$TagName/$($MsiFile.Name)
|
||||
clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.TXT
|
||||
CertificateThumbprint: $certThumbprint
|
||||
Checksum: $hash"
|
||||
Write-Output $fileContents
|
||||
}
|
||||
|
||||
|
||||
function New-ZipUpdateFileContent {
|
||||
param (
|
||||
[System.IO.FileInfo]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$ZipFile,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TagName
|
||||
)
|
||||
|
||||
$version = $ZipFile.BaseName -replace "[a-zA-Z-]*"
|
||||
$hash = Get-FileHash -Algorithm SHA512 $ZipFile | % { $_.Hash }
|
||||
|
||||
$fileContents = `
|
||||
"Version: $version
|
||||
dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$TagName/$($ZipFile.Name)
|
||||
clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.TXT
|
||||
Checksum: $hash"
|
||||
Write-Output $fileContents
|
||||
}
|
||||
|
||||
|
||||
function Resolve-UpdateCheckFileName {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("Stable","Beta","Development")]
|
||||
$UpdateChannel,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("Normal","Portable")]
|
||||
$Type
|
||||
)
|
||||
|
||||
$fileName = ""
|
||||
|
||||
if ($UpdateChannel -eq "Beta") { $fileName += "beta-" }
|
||||
elseif ($UpdateChannel -eq "Development") { $fileName += "dev-" }
|
||||
|
||||
$fileName += "update"
|
||||
|
||||
if ($Type -eq "Portable") { $fileName += "-portable" }
|
||||
|
||||
$fileName += ".txt"
|
||||
|
||||
Write-Output $fileName
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$releaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve
|
||||
$tag = Read-Host -Prompt 'Tag name'
|
||||
|
||||
Write-Host
|
||||
Write-Host
|
||||
Write-Host
|
||||
# build msi update file
|
||||
$msiFile = Get-ChildItem -Path "$releaseFolder\*.msi" | sort LastWriteTime | select -last 1
|
||||
$msiUpdateContents = New-MsiUpdateFileContent -MsiFile $msiFile -TagName $TagName
|
||||
$msiUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Normal
|
||||
Write-Output "`n`nMSI Update Check File Contents ($msiUpdateFileName)`n------------------------------"
|
||||
Tee-Object -InputObject $msiUpdateContents -FilePath "$releaseFolder\$msiUpdateFileName"
|
||||
|
||||
Write-Host PORTABLE
|
||||
Write-Host --------
|
||||
$file = Get-ChildItem -Path "$releaseFolder\*.zip" | sort LastWriteTime | select -last 1 | % { $_.FullName }
|
||||
$filename = $file.Split("\") | select -last 1
|
||||
|
||||
$version = $file.tostring().Split("-")[2].trim(".zip")
|
||||
Write-Host Version: $version
|
||||
|
||||
Write-Host dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$tag/$filename
|
||||
Write-Host clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$tag/CHANGELOG.TXT
|
||||
|
||||
$hash = Get-FileHash -Algorithm SHA512 $file | % { $_.Hash }
|
||||
Write-Host Checksum: $hash
|
||||
|
||||
|
||||
Write-Host
|
||||
Write-Host
|
||||
Write-Host
|
||||
|
||||
Write-Host MSI
|
||||
Write-Host ---
|
||||
$file = Get-ChildItem -Path "$releaseFolder\*.msi" | sort LastWriteTime | select -last 1 | % { $_.FullName }
|
||||
$filename = $file.Split("\") | select -last 1
|
||||
|
||||
$version = $file.tostring().Split("-")[2].trim(".msi")
|
||||
Write-Host Version: $version
|
||||
|
||||
Write-Host dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$tag/$filename
|
||||
Write-Host clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$tag/CHANGELOG.TXT
|
||||
|
||||
Write-Host CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA
|
||||
$hash = Get-FileHash -Algorithm SHA512 $file | % { $_.Hash }
|
||||
Write-Host Checksum: $hash
|
||||
# build zip update file
|
||||
$zipFile = Get-ChildItem -Path "$releaseFolder\*.zip" | sort LastWriteTime | select -last 1
|
||||
$zipUpdateContents = New-ZipUpdateFileContent -ZipFile $zipFile -TagName $TagName
|
||||
$zipUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Portable
|
||||
Write-Output "`n`nZip Update Check File Contents ($zipUpdateFileName)`n------------------------------"
|
||||
Tee-Object -InputObject $zipUpdateContents -FilePath "$releaseFolder\$zipUpdateFileName"
|
||||
220
Tools/github_functions.ps1
Normal file
220
Tools/github_functions.ps1
Normal file
@@ -0,0 +1,220 @@
|
||||
$githubUrl = 'https://api.github.com'
|
||||
|
||||
|
||||
function Publish-GitHubRelease {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Owner,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Repository,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$ReleaseTitle,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$TagName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# Either the SHA of the commit to target or the branch name.
|
||||
$TargetCommitish,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Description,
|
||||
|
||||
[bool]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$IsDraft,
|
||||
|
||||
[bool]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$IsPrerelease,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
$body = New-GitHubReleaseRequestBody -TagName $TagName -TargetCommitish $TargetCommitish -ReleaseTitle $ReleaseTitle -Description $Description -IsDraft $IsDraft -IsPrerelease $IsPrerelease
|
||||
$req_publishRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases" -Method Post -Headers @{"Authorization"="token $AuthToken"} -Body $body -ErrorAction Stop
|
||||
$response_publishRelease = ConvertFrom-Json -InputObject $req_publishRelease.Content
|
||||
|
||||
Write-Output $response_publishRelease
|
||||
}
|
||||
|
||||
|
||||
function Edit-GitHubRelease {
|
||||
param (
|
||||
[string]
|
||||
#[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Owner,
|
||||
|
||||
[string]
|
||||
#[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Repository,
|
||||
|
||||
[string]
|
||||
#[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$ReleaseId,
|
||||
|
||||
[string]
|
||||
#
|
||||
$ReleaseTitle,
|
||||
|
||||
[string]
|
||||
#
|
||||
$TagName,
|
||||
|
||||
[string]
|
||||
# Either the SHA of the commit to target or the branch name.
|
||||
$TargetCommitish,
|
||||
|
||||
[string]
|
||||
#
|
||||
$Description,
|
||||
|
||||
[bool]
|
||||
#
|
||||
$IsDraft,
|
||||
|
||||
[bool]
|
||||
#
|
||||
$IsPrerelease,
|
||||
|
||||
[string]
|
||||
#[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
$body_params = @{
|
||||
"TagName" = $TagName
|
||||
"TargetCommitish" = $TargetCommitish
|
||||
"ReleaseTitle" = $ReleaseTitle
|
||||
"Description" = $Description
|
||||
}
|
||||
if ($PSBoundParameters.ContainsKey("IsDraft")) { $body_params.Add("IsDraft", $IsDraft) }
|
||||
if ($PSBoundParameters.ContainsKey("IsPrerelease")) { $body_params.Add("IsPrerelease", $IsPrerelease) }
|
||||
|
||||
$body = New-GitHubReleaseRequestBody @body_params
|
||||
$req_editRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases/$ReleaseId" -Method Post -Headers @{"Authorization"="token $AuthToken"} -Body $body -ErrorAction Stop
|
||||
$response_editRelease = ConvertFrom-Json -InputObject $req_editRelease.Content
|
||||
|
||||
Write-Output $response_editRelease
|
||||
}
|
||||
|
||||
|
||||
function Get-GitHubRelease {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Owner,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Repository,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$ReleaseId,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
$req_getRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases/$ReleaseId" -Method Get -Headers @{"Authorization"="token $AuthToken"} -ErrorAction Stop
|
||||
$response_getRelease = ConvertFrom-Json -InputObject $req_getRelease.Content
|
||||
|
||||
Write-Output $response_getRelease
|
||||
}
|
||||
|
||||
|
||||
function Upload-GitHubReleaseAsset {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$UploadUri,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# Path to the file to upload with the release
|
||||
$FilePath,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# Content type of the file
|
||||
$ContentType,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
$UploadUri = $UploadUri -replace "(\{[\w,\?]*\})$"
|
||||
$file = Get-Item -Path $FilePath
|
||||
|
||||
$req_uploadZipAsset = Invoke-WebRequest -Uri "$($UploadUri)?name=$($file.Name)" -Method Post -Headers @{"Authorization"="token $AuthToken"} -ContentType $ContentType -InFile $file.FullName -ErrorAction Stop
|
||||
}
|
||||
|
||||
|
||||
function New-GitHubReleaseRequestBody {
|
||||
param (
|
||||
[string]
|
||||
#
|
||||
$TagName,
|
||||
|
||||
[string]
|
||||
# Either the SHA of the commit to target or the branch name.
|
||||
$TargetCommitish,
|
||||
|
||||
[string]
|
||||
# Title of the release
|
||||
$ReleaseTitle,
|
||||
|
||||
[string]
|
||||
# Description of the release
|
||||
$Description,
|
||||
|
||||
[bool]
|
||||
# Is this a draft?
|
||||
$IsDraft,
|
||||
|
||||
[bool]
|
||||
# Is this a pre-release?
|
||||
$IsPrerelease
|
||||
)
|
||||
|
||||
$body_params = [ordered]@{}
|
||||
if ($TagName -ne "") { $body_params.Add("tag_name", $TagName) }
|
||||
if ($TargetCommitish -ne "") { $body_params.Add("target_commitish", $TargetCommitish) }
|
||||
if ($ReleaseTitle -ne "") { $body_params.Add("name", $ReleaseTitle) }
|
||||
if ($Description -ne "") { $body_params.Add("body", $Description) }
|
||||
if ($PSBoundParameters.ContainsKey("IsDraft")) { $body_params.Add("draft", $IsDraft) }
|
||||
if ($PSBoundParameters.ContainsKey("IsPrerelease")) { $body_params.Add("prerelease", $IsPrerelease) }
|
||||
|
||||
$json_body = ConvertTo-Json -InputObject $body_params -Compress
|
||||
Write-Output $json_body
|
||||
}
|
||||
25
Tools/publish_draft_github_release.ps1
Normal file
25
Tools/publish_draft_github_release.ps1
Normal file
@@ -0,0 +1,25 @@
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Owner,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Repository,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$ReleaseId,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
. "$PSScriptRoot\github_functions.ps1"
|
||||
|
||||
Edit-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseId $ReleaseId -AuthToken $AuthToken -IsDraft $false
|
||||
@@ -62,137 +62,15 @@ param (
|
||||
)
|
||||
|
||||
|
||||
$githubUrl = 'https://api.github.com'
|
||||
if ($DescriptionIsBase64Encoded) {
|
||||
$Description = ([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Description)))
|
||||
}
|
||||
|
||||
|
||||
function Publish-Release {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Owner,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Repository,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$ReleaseTitle,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$TagName,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# Either the SHA of the commit to target or the branch name.
|
||||
$TargetCommitish,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Description,
|
||||
|
||||
[bool]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$IsDraft,
|
||||
|
||||
[bool]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$IsPrerelease,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
$body_publishRelease = @{
|
||||
"tag_name" = $TagName
|
||||
"target_commitish" = $TargetCommitish
|
||||
"name" = $ReleaseTitle
|
||||
"body" = $Description
|
||||
"draft" = $IsDraft
|
||||
"prerelease" = $IsPrerelease
|
||||
}
|
||||
|
||||
$req_publishRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases" -Method Post -Headers @{"Authorization"="token $AuthToken"} -Body (ConvertTo-Json -InputObject $body_publishRelease -Compress) -ErrorAction Stop
|
||||
$response_publishRelease = ConvertFrom-Json -InputObject $req_publishRelease.Content
|
||||
|
||||
Write-Output $response_publishRelease
|
||||
}
|
||||
. "$PSScriptRoot\github_functions.ps1"
|
||||
|
||||
|
||||
function Get-GitHubRelease {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Owner,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$Repository,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
#
|
||||
$ReleaseId,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
$req_getRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases/$ReleaseId" -Method Get -Headers @{"Authorization"="token $AuthToken"} -ErrorAction Stop
|
||||
$response_getRelease = ConvertFrom-Json -InputObject $req_getRelease.Content
|
||||
|
||||
Write-Output $response_getRelease
|
||||
}
|
||||
|
||||
|
||||
function Upload-ReleaseAsset {
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$UploadUri,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# Path to the file to upload with the release
|
||||
$FilePath,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# Content type of the file
|
||||
$ContentType,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
# The OAuth2 token to use for authentication.
|
||||
$AuthToken
|
||||
)
|
||||
|
||||
$UploadUri = $UploadUri -replace "(\{[\w,\?]*\})$"
|
||||
$file = Get-Item -Path $FilePath
|
||||
|
||||
$req_uploadZipAsset = Invoke-WebRequest -Uri "$($UploadUri)?name=$($file.Name)" -Method Post -Headers @{"Authorization"="token $AuthToken"} -ContentType $ContentType -InFile $file.FullName -ErrorAction Stop
|
||||
}
|
||||
|
||||
|
||||
|
||||
$release = Publish-Release -Owner $Owner -Repository $Repository -ReleaseTitle $ReleaseTitle -TagName $TagName -TargetCommitish $TargetCommitish -Description $Description -IsDraft ([bool]::Parse($IsDraft)) -IsPrerelease ([bool]::Parse($IsPrerelease)) -AuthToken $AuthToken
|
||||
$zipUpload = Upload-ReleaseAsset -UploadUri $release.upload_url -FilePath $ZipFilePath -ContentType "application/zip" -AuthToken $AuthToken
|
||||
$msiUpload = Upload-ReleaseAsset -UploadUri $release.upload_url -FilePath $MsiFilePath -ContentType "application/octet-stream" -AuthToken $AuthToken
|
||||
$release = Publish-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseTitle $ReleaseTitle -TagName $TagName -TargetCommitish $TargetCommitish -Description $Description -IsDraft ([bool]::Parse($IsDraft)) -IsPrerelease ([bool]::Parse($IsPrerelease)) -AuthToken $AuthToken
|
||||
$zipUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $ZipFilePath -ContentType "application/zip" -AuthToken $AuthToken
|
||||
$msiUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $MsiFilePath -ContentType "application/octet-stream" -AuthToken $AuthToken
|
||||
Write-Output (Get-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseId $release.id -AuthToken $AuthToken)
|
||||
@@ -11,20 +11,33 @@ param (
|
||||
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
# Find editbin.exe
|
||||
$path_editBin = @((Resolve-Path -Path "C:\Program Files*\Microsoft Visual Studio*\VC\bin\editbin.exe").Path)[0]
|
||||
#Resolve-Path tends to be faster, but since editbin's are all over the place it's not 100% effective
|
||||
$editBinPath = @((Resolve-Path -Path "C:\Program Files*\Microsoft Visual Studio*\VC\bin\editbin.exe").Path)
|
||||
|
||||
# Verify editbin certificate
|
||||
$microsoft_cert_thumbprint = "3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC"
|
||||
$editbin_signature = Get-AuthenticodeSignature -FilePath $path_editBin
|
||||
if (($editbin_signature.Status -ne "Valid") -or ($editbin_signature.SignerCertificate.Thumbprint -ne $microsoft_cert_thumbprint)) {
|
||||
Write-Error "Could not validate the signature of editbin.exe - we can not set LargeAddressAware" -ErrorAction Stop
|
||||
if(!$editBinPath)
|
||||
{
|
||||
# This should work on all VS versions, but doesn't on our Jenkin's build for some reason...
|
||||
# This is needed VC Community
|
||||
$editBinPath = @((gci -Path "C:\Program*\Microsoft Visual Studio\" -Filter editbin.exe -Recurse)[0].FullName)
|
||||
}
|
||||
|
||||
# if we STILL can't find it, just return. Same end result NUnit test will fail.
|
||||
if(!$editBinPath)
|
||||
{
|
||||
echo "Could not find editbin.exe - Can't set LargeAddressAware"
|
||||
return
|
||||
}
|
||||
|
||||
$path_outputExe = Join-Path -Path $TargetDir -ChildPath $TargetFileName
|
||||
echo "editBinPath value:"
|
||||
echo $editBinPath
|
||||
# Verify editbin certificate
|
||||
& "$PSScriptRoot\validate_microsoft_tool.ps1" -FullPath "$editBinPath"
|
||||
|
||||
|
||||
$outputExe = Join-Path -Path $TargetDir -ChildPath $TargetFileName
|
||||
|
||||
# Set LargeAddressAware
|
||||
Write-Output "Setting LargeAddressAware on binary file `"$path_outputExe`""
|
||||
& $path_editBin "/largeaddressaware" "$path_outputExe"
|
||||
Write-Output "Setting LargeAddressAware on binary file `"$outputExe`""
|
||||
& $editBinPath "/largeaddressaware" "$outputExe"
|
||||
|
||||
Write-Output ""
|
||||
17
Tools/validate_microsoft_tool.ps1
Normal file
17
Tools/validate_microsoft_tool.ps1
Normal file
@@ -0,0 +1,17 @@
|
||||
# $FullPath Full path to the Microsoft executable to validate
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$FullPath
|
||||
)
|
||||
|
||||
$validMSCertThumbprints = @("3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC", "108E2BA23632620C427C570B6D9DB51AC31387FE", "98ED99A67886D020C564923B7DF25E9AC019DF26", "5EAD300DC7E4D637948ECB0ED829A072BD152E17")
|
||||
$exeSignature = Get-AuthenticodeSignature -FilePath $FullPath
|
||||
$baseErrorMsg = "Could not validate the certificate of $FullPath. "
|
||||
|
||||
if ($exeSignature.Status -ne "Valid") {
|
||||
Write-Error -Message ($baseErrorMsg+"The signature was invalid.") -ErrorAction Stop
|
||||
}
|
||||
elseif ($validMSCertThumbprints -notcontains $exeSignature.SignerCertificate.Thumbprint) {
|
||||
Write-Error -Message ($baseErrorMsg+"The certificate thumbprint ($($exeSignature.SignerCertificate.Thumbprint)) is not trusted.") -ErrorAction Stop
|
||||
}
|
||||
57
mRemoteNGTests/Connection/Protocol/IntegratedProgramTests.cs
Normal file
57
mRemoteNGTests/Connection/Protocol/IntegratedProgramTests.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System.Collections;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Window;
|
||||
using NUnit.Framework;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
namespace mRemoteNGTests.Connection.Protocol
|
||||
{
|
||||
public class IntegratedProgramTests
|
||||
{
|
||||
private readonly ExternalTool _extTool = new ExternalTool
|
||||
{
|
||||
DisplayName = "notepad",
|
||||
FileName = @"%windir%\system32\notepad.exe",
|
||||
Arguments = "",
|
||||
TryIntegrate = true
|
||||
};
|
||||
|
||||
|
||||
[Test]
|
||||
public void CanStartExternalApp()
|
||||
{
|
||||
SetExternalToolList(_extTool);
|
||||
var sut = new IntegratedProgram();
|
||||
sut.InterfaceControl = BuildInterfaceControl("notepad", sut);
|
||||
sut.Initialize();
|
||||
var appStarted = sut.Connect();
|
||||
sut.Disconnect();
|
||||
Assert.That(appStarted);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ConnectingToExternalAppThatDoesntExistDoesNothing()
|
||||
{
|
||||
SetExternalToolList(_extTool);
|
||||
var sut = new IntegratedProgram();
|
||||
sut.InterfaceControl = BuildInterfaceControl("doesntExist", sut);
|
||||
var appInitialized = sut.Initialize();
|
||||
Assert.That(appInitialized, Is.False);
|
||||
}
|
||||
|
||||
private void SetExternalToolList(ExternalTool externalTool)
|
||||
{
|
||||
Runtime.ExternalTools = new ArrayList {externalTool};
|
||||
}
|
||||
|
||||
private InterfaceControl BuildInterfaceControl(string extAppName, ProtocolBase sut)
|
||||
{
|
||||
var connectionWindow = new ConnectionWindow(new DockContent());
|
||||
var connectionInfo = new ConnectionInfo {ExtApp = extAppName};
|
||||
return new InterfaceControl(connectionWindow, sut, connectionInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,13 +62,11 @@
|
||||
<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>
|
||||
<Private>True</Private>
|
||||
<Reference Include="NSubstitute, Version=2.0.3.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NSubstitute.2.0.3\lib\net45\NSubstitute.dll</HintPath>
|
||||
</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>
|
||||
<Private>True</Private>
|
||||
<Reference Include="nunit.framework, Version=3.8.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NUnitForms">
|
||||
<HintPath>nUnitForms\bin\NUnitForms.dll</HintPath>
|
||||
@@ -125,6 +123,7 @@
|
||||
<Compile Include="Config\Serializers\XmlRootNodeSerializerTests.cs" />
|
||||
<Compile Include="Connection\AbstractConnectionInfoDataTests.cs" />
|
||||
<Compile Include="Connection\ConnectionInfoComparerTests.cs" />
|
||||
<Compile Include="Connection\Protocol\IntegratedProgramTests.cs" />
|
||||
<Compile Include="Connection\Protocol\ProtocolListTests.cs" />
|
||||
<Compile Include="IntegrationTests\XmlSerializationLifeCycleTests.cs" />
|
||||
<Compile Include="Security\Authentication\PasswordAuthenticatorTests.cs" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<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="NSubstitute" version="2.0.3" targetFramework="net45" />
|
||||
<package id="NUnit" version="3.8.1" targetFramework="net45" />
|
||||
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net45" />
|
||||
</packages>
|
||||
@@ -1,4 +1,5 @@
|
||||
using log4net;
|
||||
using System.Diagnostics;
|
||||
using log4net;
|
||||
using log4net.Appender;
|
||||
using log4net.Config;
|
||||
#if !PORTABLE
|
||||
@@ -45,14 +46,23 @@ namespace mRemoteNG.App
|
||||
|
||||
private static string BuildLogFilePath()
|
||||
{
|
||||
if (!Settings.Default.WriteLogFile)
|
||||
return "";
|
||||
|
||||
#if !PORTABLE
|
||||
var logFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Application.ProductName);
|
||||
#else
|
||||
var logFilePath = Application.StartupPath;
|
||||
#endif
|
||||
var logFileName = Path.ChangeExtension(Application.ProductName, ".log");
|
||||
var logFile = Path.Combine(logFilePath, logFileName);
|
||||
return logFile;
|
||||
if (logFileName != null)
|
||||
{
|
||||
var logFile = Path.Combine(logFilePath, logFileName);
|
||||
return logFile;
|
||||
}
|
||||
|
||||
Debug.Print("Error: Could not determine log file path.");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,7 @@ namespace mRemoteNG.App
|
||||
if (singletonInstanceWindowHandle == IntPtr.Zero) return;
|
||||
if (NativeMethods.IsIconic(singletonInstanceWindowHandle) != 0)
|
||||
NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE);
|
||||
NativeMethods.SetForegroundWindow(singletonInstanceWindowHandle);
|
||||
}
|
||||
|
||||
private static IntPtr GetRunningSingletonInstanceWindowHandle()
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace mRemoteNG.App
|
||||
public static bool IsConnectionsFileLoaded { get; set; }
|
||||
public static RemoteConnectionsSyncronizer RemoteConnectionsSyncronizer { get; set; }
|
||||
// ReSharper disable once UnusedAutoPropertyAccessor.Local
|
||||
private static DateTime LastSqlUpdate { get; set; }
|
||||
public static DateTime LastSqlUpdate { get; set; }
|
||||
public static ArrayList ExternalTools { get; set; } = new ArrayList();
|
||||
public static SecureString EncryptionKey { get; set; } = new RootNodeInfo(RootNodeType.Connection).PasswordString.ConvertToSecureString();
|
||||
public static ConnectionTreeModel ConnectionTreeModel
|
||||
@@ -283,7 +283,7 @@ namespace mRemoteNG.App
|
||||
connectionsLoader.ConnectionFileName = GetStartupConnectionFileName();
|
||||
}
|
||||
|
||||
CreateBackupFile(Convert.ToString(connectionsLoader.ConnectionFileName));
|
||||
CreateBackupFile(connectionsLoader.ConnectionFileName);
|
||||
}
|
||||
|
||||
connectionsLoader.UseDatabase = Settings.Default.UseSQLServer;
|
||||
@@ -334,7 +334,7 @@ namespace mRemoteNG.App
|
||||
if (ex is FileNotFoundException && !withDialog)
|
||||
{
|
||||
MessageCollector.AddExceptionMessage(string.Format(Language.strConnectionsFileCouldNotBeLoadedNew, connectionsLoader.ConnectionFileName), ex, MessageClass.InformationMsg);
|
||||
NewConnections(Convert.ToString(connectionsLoader.ConnectionFileName));
|
||||
NewConnections(connectionsLoader.ConnectionFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -465,11 +465,11 @@ namespace mRemoteNG.App
|
||||
if (Settings.Default.UseSQLServer)
|
||||
{
|
||||
connectionsSaver.SaveFormat = ConnectionsSaver.Format.SQL;
|
||||
connectionsSaver.SQLHost = Convert.ToString(Settings.Default.SQLHost);
|
||||
connectionsSaver.SQLDatabaseName = Convert.ToString(Settings.Default.SQLDatabaseName);
|
||||
connectionsSaver.SQLUsername = Convert.ToString(Settings.Default.SQLUser);
|
||||
connectionsSaver.SQLHost = Settings.Default.SQLHost;
|
||||
connectionsSaver.SQLDatabaseName = Settings.Default.SQLDatabaseName;
|
||||
connectionsSaver.SQLUsername = Settings.Default.SQLUser;
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
connectionsSaver.SQLPassword = cryptographyProvider.Decrypt(Convert.ToString(Settings.Default.SQLPass), EncryptionKey);
|
||||
connectionsSaver.SQLPassword = cryptographyProvider.Decrypt(Settings.Default.SQLPass, EncryptionKey);
|
||||
}
|
||||
|
||||
connectionsSaver.SaveConnections();
|
||||
|
||||
@@ -42,8 +42,6 @@ namespace mRemoteNG.App
|
||||
ParseCommandLineArgs();
|
||||
IeBrowserEmulation.Register();
|
||||
GetConnectionIcons();
|
||||
DefaultConnectionInfo.Instance.LoadFrom(Settings.Default, a=>"ConDefault"+a);
|
||||
DefaultConnectionInheritance.Instance.LoadFrom(Settings.Default, a=>"InhDefault"+a);
|
||||
}
|
||||
|
||||
private static void GetConnectionIcons()
|
||||
@@ -76,7 +74,7 @@ namespace mRemoteNG.App
|
||||
{
|
||||
var osData = GetOperatingSystemData();
|
||||
var architecture = GetArchitectureData();
|
||||
Logger.Instance.InfoFormat(string.Join(" ", Array.FindAll(new[] { osData, architecture }, s => !string.IsNullOrEmpty(Convert.ToString(s)))));
|
||||
Logger.Instance.InfoFormat(string.Join(" ", Array.FindAll(new[] { osData, architecture }, s => !string.IsNullOrEmpty(s))));
|
||||
}
|
||||
|
||||
private static string GetOperatingSystemData()
|
||||
@@ -214,10 +212,37 @@ namespace mRemoteNG.App
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("GetUpdateInfoCompleted() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("GetUpdateInfoCompleted() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a path to a file connections XML file for a given absolute or relative path
|
||||
/// </summary>
|
||||
/// <param name="ConsParam">The absolute or relative path to the connection XML file</param>
|
||||
/// <returns>string or null</returns>
|
||||
private static string GetCustomConsPath(string ConsParam)
|
||||
{
|
||||
// early exit condition
|
||||
if (string.IsNullOrEmpty(ConsParam))
|
||||
return null;
|
||||
|
||||
// trim invalid characters for the Combine method (see: https://msdn.microsoft.com/en-us/library/fyy7a5kt.aspx#Anchor_2)
|
||||
ConsParam = ConsParam.Trim().TrimStart('\\').Trim();
|
||||
|
||||
// fallback paths
|
||||
if (File.Exists(ConsParam))
|
||||
return ConsParam;
|
||||
|
||||
if (File.Exists(Path.Combine(GeneralAppInfo.HomePath, ConsParam)))
|
||||
return GeneralAppInfo.HomePath + Path.DirectorySeparatorChar + ConsParam;
|
||||
|
||||
if (File.Exists(Path.Combine(ConnectionsFileInfo.DefaultConnectionsPath, ConsParam)))
|
||||
return ConnectionsFileInfo.DefaultConnectionsPath + Path.DirectorySeparatorChar + ConsParam;
|
||||
|
||||
// default case
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void ParseCommandLineArgs()
|
||||
{
|
||||
@@ -228,11 +253,11 @@ namespace mRemoteNG.App
|
||||
var ConsParam = "";
|
||||
if (cmd["cons"] != null)
|
||||
{
|
||||
ConsParam = "cons";
|
||||
ConsParam = cmd["cons"];
|
||||
}
|
||||
if (cmd["c"] != null)
|
||||
{
|
||||
ConsParam = "c";
|
||||
ConsParam = cmd["c"];
|
||||
}
|
||||
|
||||
var ResetPosParam = "";
|
||||
@@ -282,36 +307,23 @@ namespace mRemoteNG.App
|
||||
NoReconnectParam = "norc";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ConsParam))
|
||||
// Handle custom connection file location
|
||||
var consPathFromParam = GetCustomConsPath(ConsParam);
|
||||
if (consPathFromParam != null)
|
||||
{
|
||||
if (File.Exists(cmd[ConsParam]) == false)
|
||||
{
|
||||
if (File.Exists(GeneralAppInfo.HomePath + "\\" + cmd[ConsParam]))
|
||||
{
|
||||
Settings.Default.LoadConsFromCustomLocation = true;
|
||||
Settings.Default.CustomConsPath = GeneralAppInfo.HomePath + "\\" + cmd[ConsParam];
|
||||
return;
|
||||
}
|
||||
if (File.Exists(ConnectionsFileInfo.DefaultConnectionsPath + "\\" + cmd[ConsParam]))
|
||||
{
|
||||
Settings.Default.LoadConsFromCustomLocation = true;
|
||||
Settings.Default.CustomConsPath = ConnectionsFileInfo.DefaultConnectionsPath + "\\" + cmd[ConsParam];
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Settings.Default.LoadConsFromCustomLocation = true;
|
||||
Settings.Default.CustomConsPath = cmd[ConsParam];
|
||||
return;
|
||||
}
|
||||
Settings.Default.CustomConsPath = consPathFromParam;
|
||||
Settings.Default.LoadConsFromCustomLocation = true;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ResetPosParam))
|
||||
{
|
||||
Settings.Default.MainFormKiosk = false;
|
||||
Settings.Default.MainFormLocation = new Point(999, 999);
|
||||
Settings.Default.MainFormSize = new Size(900, 600);
|
||||
var newWidth = 900;
|
||||
var newHeight = 600;
|
||||
var newX = Screen.PrimaryScreen.WorkingArea.Width/2 - newWidth/2;
|
||||
var newY = Screen.PrimaryScreen.WorkingArea.Height/2 - newHeight/2;
|
||||
Settings.Default.MainFormLocation = new Point(newX, newY);
|
||||
Settings.Default.MainFormSize = new Size(newWidth, newHeight);
|
||||
Settings.Default.MainFormState = FormWindowState.Normal;
|
||||
}
|
||||
|
||||
@@ -329,6 +341,8 @@ namespace mRemoteNG.App
|
||||
{
|
||||
Settings.Default.ResetToolbars = true;
|
||||
}
|
||||
|
||||
Settings.Default.Save();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -57,7 +57,15 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
private bool DatabaseIsMoreUpToDateThanUs()
|
||||
{
|
||||
return GetLastUpdateTimeFromDbResponse() > _lastUpdateTime;
|
||||
var lastUpdateInDb = GetLastUpdateTimeFromDbResponse();
|
||||
var IAmTheLastoneUpdated = CheckIfIAmTheLastOneUpdated(lastUpdateInDb);
|
||||
return (lastUpdateInDb > _lastUpdateTime && !IAmTheLastoneUpdated);
|
||||
}
|
||||
|
||||
private bool CheckIfIAmTheLastOneUpdated(DateTime lastUpdateInDb)
|
||||
{
|
||||
DateTime LastSqlUpdateWithoutMilliseconds = new DateTime(Runtime.LastSqlUpdate.Ticks - (Runtime.LastSqlUpdate.Ticks % TimeSpan.TicksPerSecond), Runtime.LastSqlUpdate.Kind);
|
||||
return lastUpdateInDb == LastSqlUpdateWithoutMilliseconds;
|
||||
}
|
||||
|
||||
private DateTime GetLastUpdateTimeFromDbResponse()
|
||||
|
||||
@@ -18,11 +18,17 @@ namespace mRemoteNG.Connection
|
||||
|
||||
public void LoadFrom<TSource>(TSource sourceInstance, Func<string, string> propertyNameMutator = null)
|
||||
{
|
||||
if (propertyNameMutator == null) propertyNameMutator = (a) => a;
|
||||
if (propertyNameMutator == null) propertyNameMutator = a => a;
|
||||
var connectionProperties = GetProperties(_excludedProperties);
|
||||
foreach (var property in connectionProperties)
|
||||
{
|
||||
var propertyFromSource = typeof(TSource).GetProperty(propertyNameMutator(property.Name));
|
||||
if (propertyFromSource == null)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
|
||||
$"DefaultConInfo-LoadFrom: Could not load {property.Name}", true);
|
||||
continue;
|
||||
}
|
||||
var valueFromSource = propertyFromSource.GetValue(sourceInstance, null);
|
||||
|
||||
var descriptor = TypeDescriptor.GetProperties(Instance)[property.Name];
|
||||
@@ -36,7 +42,7 @@ namespace mRemoteNG.Connection
|
||||
|
||||
public void SaveTo<TDestination>(TDestination destinationInstance, Func<string, string> propertyNameMutator = null)
|
||||
{
|
||||
if (propertyNameMutator == null) propertyNameMutator = (a) => a;
|
||||
if (propertyNameMutator == null) propertyNameMutator = a => a;
|
||||
var inheritanceProperties = GetProperties(_excludedProperties);
|
||||
foreach (var property in inheritanceProperties)
|
||||
{
|
||||
@@ -44,6 +50,12 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
var propertyFromDestination = typeof(TDestination).GetProperty(propertyNameMutator(property.Name));
|
||||
var localValue = property.GetValue(Instance, null);
|
||||
if (propertyFromDestination == null)
|
||||
{
|
||||
Runtime.MessageCollector?.AddMessage(Messages.MessageClass.ErrorMsg,
|
||||
$"DefaultConInfo-SaveTo: Could not load {property.Name}", true);
|
||||
continue;
|
||||
}
|
||||
var convertedValue = Convert.ChangeType(localValue, propertyFromDestination.PropertyType);
|
||||
propertyFromDestination.SetValue(destinationInstance, convertedValue, null);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using mRemoteNG.App;
|
||||
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
@@ -17,11 +18,17 @@ namespace mRemoteNG.Connection
|
||||
|
||||
public void LoadFrom<TSource>(TSource sourceInstance, Func<string,string> propertyNameMutator = null)
|
||||
{
|
||||
if (propertyNameMutator == null) propertyNameMutator = (a) => a;
|
||||
if (propertyNameMutator == null) propertyNameMutator = a => a;
|
||||
var inheritanceProperties = GetProperties();
|
||||
foreach (var property in inheritanceProperties)
|
||||
{
|
||||
var propertyFromSettings = typeof(TSource).GetProperty(propertyNameMutator(property.Name));
|
||||
if (propertyFromSettings == null)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
|
||||
$"DefaultConInherit-LoadFrom: Could not load {property.Name}", true);
|
||||
continue;
|
||||
}
|
||||
var valueFromSettings = propertyFromSettings.GetValue(sourceInstance, null);
|
||||
property.SetValue(Instance, valueFromSettings, null);
|
||||
}
|
||||
@@ -29,12 +36,18 @@ namespace mRemoteNG.Connection
|
||||
|
||||
public void SaveTo<TDestination>(TDestination destinationInstance, Func<string, string> propertyNameMutator = null)
|
||||
{
|
||||
if (propertyNameMutator == null) propertyNameMutator = (a) => a;
|
||||
if (propertyNameMutator == null) propertyNameMutator = a => a;
|
||||
var inheritanceProperties = GetProperties();
|
||||
foreach (var property in inheritanceProperties)
|
||||
{
|
||||
var propertyFromSettings = typeof(TDestination).GetProperty(propertyNameMutator(property.Name));
|
||||
var localValue = property.GetValue(Instance, null);
|
||||
if (propertyFromSettings == null)
|
||||
{
|
||||
Runtime.MessageCollector?.AddMessage(Messages.MessageClass.ErrorMsg,
|
||||
$"DefaultConInherit-SaveTo: Could not load {property.Name}", true);
|
||||
continue;
|
||||
}
|
||||
propertyFromSettings.SetValue(destinationInstance, localValue, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Tools;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol
|
||||
@@ -21,9 +21,15 @@ namespace mRemoteNG.Connection.Protocol
|
||||
#region Public Methods
|
||||
public override bool Initialize()
|
||||
{
|
||||
if (InterfaceControl.Info == null) return base.Initialize();
|
||||
if (InterfaceControl.Info == null)
|
||||
return base.Initialize();
|
||||
|
||||
_externalTool = Runtime.GetExtAppByName(InterfaceControl.Info.ExtApp);
|
||||
if (_externalTool == null)
|
||||
{
|
||||
Runtime.MessageCollector?.AddMessage(MessageClass.ErrorMsg, string.Format(Language.CouldNotFindExternalTool, InterfaceControl.Info.ExtApp));
|
||||
return false;
|
||||
}
|
||||
_externalTool.ConnectionInfo = InterfaceControl.Info;
|
||||
|
||||
return base.Initialize();
|
||||
@@ -33,7 +39,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
{
|
||||
try
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Attempting to start: {_externalTool.DisplayName}", true);
|
||||
Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, $"Attempting to start: {_externalTool.DisplayName}", true);
|
||||
|
||||
if (_externalTool.TryIntegrate == false)
|
||||
{
|
||||
@@ -43,7 +49,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
* will be called - which is just going to call IntegratedProgram.Close() again anyway...
|
||||
* Close();
|
||||
*/
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Assuming no other errors/exceptions occurred immediately before this message regarding {_externalTool.DisplayName}, the next \"closed by user\" message can be ignored", true);
|
||||
Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, $"Assuming no other errors/exceptions occurred immediately before this message regarding {_externalTool.DisplayName}, the next \"closed by user\" message can be ignored", true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -63,9 +69,9 @@ namespace mRemoteNG.Connection.Protocol
|
||||
_process.Exited += ProcessExited;
|
||||
|
||||
_process.Start();
|
||||
_process.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000);
|
||||
|
||||
var startTicks = Environment.TickCount;
|
||||
_process.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000);
|
||||
|
||||
var startTicks = Environment.TickCount;
|
||||
while (_handle.ToInt32() == 0 & Environment.TickCount < startTicks + Settings.Default.MaxPuttyWaitTime * 1000)
|
||||
{
|
||||
_process.Refresh();
|
||||
@@ -80,10 +86,10 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
|
||||
NativeMethods.SetParent(_handle, InterfaceControl.Handle);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.strIntAppStuff, true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.strIntAppHandle, _handle), true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.strIntAppTitle, _process.MainWindowTitle), true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.strIntAppParentHandle, InterfaceControl.Parent.Handle), true);
|
||||
Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, Language.strIntAppStuff, true);
|
||||
Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, string.Format(Language.strIntAppHandle, _handle), true);
|
||||
Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, string.Format(Language.strIntAppTitle, _process.MainWindowTitle), true);
|
||||
Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, string.Format(Language.strIntAppParentHandle, InterfaceControl.Parent.Handle), true);
|
||||
|
||||
Resize(this, new EventArgs());
|
||||
base.Connect();
|
||||
@@ -91,7 +97,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage(Language.strIntAppConnectionFailed, ex);
|
||||
Runtime.MessageCollector?.AddExceptionMessage(Language.strIntAppConnectionFailed, ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace("Couldn't dispose control, probably form is already closed (Connection.Protocol.Base)", ex);
|
||||
Runtime.MessageCollector?.AddExceptionStackTrace("Couldn't dispose control, probably form is already closed (Connection.Protocol.Base)", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,12 +172,12 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace("Couldn't set InterfaceControl.Parent.Tag or Dispose Interface, probably form is already closed (Connection.Protocol.Base)", ex);
|
||||
Runtime.MessageCollector?.AddExceptionStackTrace("Couldn't set InterfaceControl.Parent.Tag or Dispose Interface, probably form is already closed (Connection.Protocol.Base)", ex);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace("Couldn't Close InterfaceControl BG (Connection.Protocol.Base)", ex);
|
||||
Runtime.MessageCollector?.AddExceptionStackTrace("Couldn't Close InterfaceControl BG (Connection.Protocol.Base)", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
else if (Settings.Default.EmptyCredentials == "custom")
|
||||
{
|
||||
username = Convert.ToString(Settings.Default.DefaultUsername);
|
||||
username = Settings.Default.DefaultUsername;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
if (Settings.Default.EmptyCredentials == "custom")
|
||||
{
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
password = cryptographyProvider.Decrypt(Convert.ToString(Settings.Default.DefaultPassword), Runtime.EncryptionKey);
|
||||
password = cryptographyProvider.Decrypt(Settings.Default.DefaultPassword, Runtime.EncryptionKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
}
|
||||
else if (Settings.Default.EmptyCredentials == "custom")
|
||||
{
|
||||
_rdpClient.UserName = Convert.ToString(Settings.Default.DefaultUsername);
|
||||
_rdpClient.UserName = Settings.Default.DefaultUsername;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -443,7 +443,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
if (Settings.Default.DefaultPassword != "")
|
||||
{
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
_rdpClient.AdvancedSettings2.ClearTextPassword = cryptographyProvider.Decrypt(Convert.ToString(Settings.Default.DefaultPassword), Runtime.EncryptionKey);
|
||||
_rdpClient.AdvancedSettings2.ClearTextPassword = cryptographyProvider.Decrypt(Settings.Default.DefaultPassword, Runtime.EncryptionKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -460,7 +460,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
}
|
||||
else if (Settings.Default.EmptyCredentials == "custom")
|
||||
{
|
||||
_rdpClient.Domain = Convert.ToString(Settings.Default.DefaultDomain);
|
||||
_rdpClient.Domain = Settings.Default.DefaultDomain;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -34,28 +34,27 @@ namespace mRemoteNG.Messages
|
||||
|
||||
var EnableTimer = true; // used to control if we SWITCH to the notifiation panel. Message will still be added regardless.
|
||||
|
||||
if (nMsg.MsgClass == MessageClass.InformationMsg)
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (nMsg.MsgClass)
|
||||
{
|
||||
AddInfoMessage(nMsg);
|
||||
case MessageClass.InformationMsg:
|
||||
AddInfoMessage(nMsg);
|
||||
|
||||
if (!Settings.Default.SwitchToMCOnInformation)
|
||||
EnableTimer = false;
|
||||
}
|
||||
if (!Settings.Default.SwitchToMCOnInformation)
|
||||
EnableTimer = false;
|
||||
break;
|
||||
case MessageClass.WarningMsg:
|
||||
AddWarningMessage(nMsg);
|
||||
|
||||
if (nMsg.MsgClass == MessageClass.WarningMsg)
|
||||
{
|
||||
AddWarningMessage(nMsg);
|
||||
if (!Settings.Default.SwitchToMCOnWarning)
|
||||
EnableTimer = false;
|
||||
break;
|
||||
case MessageClass.ErrorMsg:
|
||||
AddErrorMessage(nMsg);
|
||||
|
||||
if (!Settings.Default.SwitchToMCOnWarning)
|
||||
EnableTimer = false;
|
||||
}
|
||||
|
||||
if (nMsg.MsgClass == MessageClass.ErrorMsg)
|
||||
{
|
||||
AddErrorMessage(nMsg);
|
||||
|
||||
if (!Settings.Default.SwitchToMCOnError)
|
||||
EnableTimer = false;
|
||||
if (!Settings.Default.SwitchToMCOnError)
|
||||
EnableTimer = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (OnlyLog)
|
||||
@@ -95,7 +94,8 @@ namespace mRemoteNG.Messages
|
||||
private static void AddErrorMessage(Message nMsg)
|
||||
{
|
||||
Debug.Print("Error: " + nMsg.MsgText);
|
||||
Logger.Instance.Error(nMsg.MsgText);
|
||||
if (Settings.Default.WriteLogFile)
|
||||
Logger.Instance.Error(nMsg.MsgText);
|
||||
}
|
||||
|
||||
private static void AddReportMessage(Message nMsg)
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.Runtime.InteropServices;
|
||||
// by using the '*' as shown below:
|
||||
// <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
[assembly: AssemblyVersion("1.75.7008.*")]
|
||||
[assembly: AssemblyVersion("1.75.7011.*")]
|
||||
|
||||
[assembly:NeutralResourcesLanguageAttribute("en")]
|
||||
|
||||
|
||||
11
mRemoteV1/Resources/Language/Language.Designer.cs
generated
11
mRemoteV1/Resources/Language/Language.Designer.cs
generated
@@ -60,6 +60,15 @@ namespace mRemoteNG {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Could not find external tool with name "{0}".
|
||||
/// </summary>
|
||||
internal static string CouldNotFindExternalTool {
|
||||
get {
|
||||
return ResourceManager.GetString("CouldNotFindExternalTool", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to About.
|
||||
/// </summary>
|
||||
@@ -440,7 +449,7 @@ namespace mRemoteNG {
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You cannot import a normal connection file.
|
||||
///Please use File - Load Connections for normal connection files!.
|
||||
///Please use File - Open Connection File for normal connection files!.
|
||||
/// </summary>
|
||||
internal static string strCannotImportNormalSessionFile {
|
||||
get {
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
</data>
|
||||
<data name="strCannotImportNormalSessionFile" xml:space="preserve">
|
||||
<value>You cannot import a normal connection file.
|
||||
Please use File - Load Connections for normal connection files!</value>
|
||||
Please use File - Open Connection File for normal connection files!</value>
|
||||
</data>
|
||||
<data name="strCannotStartPortScan" xml:space="preserve">
|
||||
<value>IPアドレスのフォーマットが正しくないのでポートスキャンの開始に失敗しました</value>
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
</data>
|
||||
<data name="strCannotImportNormalSessionFile" xml:space="preserve">
|
||||
<value>You cannot import a normal connection file.
|
||||
Please use File - Load Connections for normal connection files!</value>
|
||||
Please use File - Open Connection File for normal connection files!</value>
|
||||
</data>
|
||||
<data name="strCannotStartPortScan" xml:space="preserve">
|
||||
<value>Cannot start Port Scan, incorrect IP format!</value>
|
||||
@@ -2433,4 +2433,7 @@ mRemoteNG will now quit and begin with the installation.</value>
|
||||
<data name="strPropertyNameRDPAlertIdleTimeout" xml:space="preserve">
|
||||
<value>Alert on Idle Disconnect</value>
|
||||
</data>
|
||||
<data name="CouldNotFindExternalTool" xml:space="preserve">
|
||||
<value>Could not find external tool with name "{0}"</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
@@ -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;
|
||||
}
|
||||
@@ -67,7 +66,7 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
else if (node.GetTreeNodeType() == TreeNodeType.Connection)
|
||||
{
|
||||
menuItem.Image = Resources.Pause;
|
||||
menuItem.Image = node.OpenConnections.Count > 0 ? Resources.Play : Resources.Pause;
|
||||
menuItem.Tag = node;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using mRemoteNG.App;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
@@ -169,12 +171,26 @@ namespace mRemoteNG.Tools
|
||||
break;
|
||||
case "username":
|
||||
replacement = _connectionInfo.Username;
|
||||
if (string.IsNullOrEmpty(replacement))
|
||||
if (Settings.Default.EmptyCredentials == "windows")
|
||||
replacement = Environment.UserName;
|
||||
else if (Settings.Default.EmptyCredentials == "custom")
|
||||
replacement = Settings.Default.DefaultUsername;
|
||||
break;
|
||||
case "password":
|
||||
replacement = _connectionInfo.Password;
|
||||
if (string.IsNullOrEmpty(replacement) && Settings.Default.EmptyCredentials == "custom")
|
||||
replacement = new LegacyRijndaelCryptographyProvider()
|
||||
.Decrypt(Convert.ToString(Settings.Default.DefaultPassword),
|
||||
Runtime.EncryptionKey);
|
||||
break;
|
||||
case "domain":
|
||||
replacement = _connectionInfo.Domain;
|
||||
if (string.IsNullOrEmpty(replacement))
|
||||
if (Settings.Default.EmptyCredentials == "windows")
|
||||
replacement = Environment.UserDomainName;
|
||||
else if (Settings.Default.EmptyCredentials == "custom")
|
||||
replacement = Settings.Default.DefaultDomain;
|
||||
break;
|
||||
case "description":
|
||||
replacement = _connectionInfo.Description;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Security.AccessControl;
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
|
||||
namespace mRemoteNG.Tools
|
||||
{
|
||||
@@ -202,7 +202,7 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("IeBrowserEmulation.Register() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector?.AddExceptionMessage("IeBrowserEmulation.Register() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("IeBrowserEmulation.Unregister() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
Runtime.MessageCollector?.AddExceptionMessage("IeBrowserEmulation.Unregister() failed.", ex, MessageClass.ErrorMsg, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -23,14 +23,14 @@ namespace mRemoteNG.Tools
|
||||
|
||||
public PortScanner(IPAddress ipAddress1, IPAddress ipAddress2, int port1, int port2)
|
||||
{
|
||||
IPAddress ipAddressStart = IpAddressMin(ipAddress1, ipAddress2);
|
||||
IPAddress ipAddressEnd = IpAddressMax(ipAddress1, ipAddress2);
|
||||
var ipAddressStart = IpAddressMin(ipAddress1, ipAddress2);
|
||||
var ipAddressEnd = IpAddressMax(ipAddress1, ipAddress2);
|
||||
|
||||
int portStart = Math.Min(port1, port2);
|
||||
int portEnd = Math.Max(port1, port2);
|
||||
var portStart = Math.Min(port1, port2);
|
||||
var portEnd = Math.Max(port1, port2);
|
||||
|
||||
_ports.Clear();
|
||||
for (int port = portStart; port <= portEnd; port++)
|
||||
for (var port = portStart; port <= portEnd; port++)
|
||||
{
|
||||
_ports.Add(port);
|
||||
}
|
||||
@@ -59,8 +59,8 @@ namespace mRemoteNG.Tools
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Net.Sockets.TcpClient tcpClient = new System.Net.Sockets.TcpClient(hostname, Convert.ToInt32(port));
|
||||
tcpClient.Close();
|
||||
var tcpClient = new System.Net.Sockets.TcpClient(hostname, Convert.ToInt32(port));
|
||||
tcpClient.Close();
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
@@ -79,16 +79,21 @@ namespace mRemoteNG.Tools
|
||||
{
|
||||
hostCount = 0;
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Tools.PortScan: Starting scan of {_ipAddresses.Count} hosts...", true);
|
||||
foreach (IPAddress ipAddress in _ipAddresses)
|
||||
foreach (var ipAddress in _ipAddresses)
|
||||
{
|
||||
BeginHostScanEvent?.Invoke(ipAddress.ToString());
|
||||
|
||||
Ping pingSender = new Ping();
|
||||
var pingSender = new Ping();
|
||||
|
||||
try
|
||||
{
|
||||
pingSender.PingCompleted += PingSender_PingCompleted;
|
||||
pingSender.SendAsync(ipAddress, ipAddress);
|
||||
|
||||
/* https://msdn.microsoft.com/en-us/library/0e6kc029(v=vs.110).aspx
|
||||
* Default timeout is 5 seconds... That's a bit long...
|
||||
*/
|
||||
//TODO Make timeout configurable...
|
||||
pingSender.SendAsync(ipAddress, /*userToken:*/ ipAddress);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -109,7 +114,7 @@ namespace mRemoteNG.Tools
|
||||
{
|
||||
// UserState is the IP Address
|
||||
var ip = e.UserState.ToString();
|
||||
ScanHost scanHost = new ScanHost(ip);
|
||||
var scanHost = new ScanHost(ip);
|
||||
hostCount++;
|
||||
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Tools.PortScan: Scanning {hostCount} of {_ipAddresses.Count} hosts: {scanHost.HostIp}", true);
|
||||
@@ -129,9 +134,7 @@ namespace mRemoteNG.Tools
|
||||
}
|
||||
catch (Exception dnsex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
|
||||
$"Tools.PortScan: Could not resolve {scanHost.HostIp} {Environment.NewLine} {dnsex.Message}",
|
||||
true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Tools.PortScan: Could not resolve {scanHost.HostIp} {Environment.NewLine} {dnsex.Message}", true);
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(scanHost.HostName))
|
||||
@@ -139,12 +142,12 @@ namespace mRemoteNG.Tools
|
||||
scanHost.HostName = scanHost.HostIp;
|
||||
}
|
||||
|
||||
foreach (int port in _ports)
|
||||
foreach (var port in _ports)
|
||||
{
|
||||
bool isPortOpen;
|
||||
try
|
||||
{
|
||||
System.Net.Sockets.TcpClient tcpClient = new System.Net.Sockets.TcpClient(ip, port);
|
||||
var tcpClient = new System.Net.Sockets.TcpClient(ip, port);
|
||||
isPortOpen = true;
|
||||
scanHost.OpenPorts.Add(port);
|
||||
tcpClient.Close();
|
||||
@@ -209,16 +212,16 @@ namespace mRemoteNG.Tools
|
||||
|
||||
private static IPAddress[] IpAddressArrayFromRange(IPAddress ipAddress1, IPAddress ipAddress2)
|
||||
{
|
||||
IPAddress startIpAddress = IpAddressMin(ipAddress1, ipAddress2);
|
||||
IPAddress endIpAddress = IpAddressMax(ipAddress1, ipAddress2);
|
||||
var startIpAddress = IpAddressMin(ipAddress1, ipAddress2);
|
||||
var endIpAddress = IpAddressMax(ipAddress1, ipAddress2);
|
||||
|
||||
int startAddress = IpAddressToInt32(startIpAddress);
|
||||
int endAddress = IpAddressToInt32(endIpAddress);
|
||||
int addressCount = endAddress - startAddress;
|
||||
var startAddress = IpAddressToInt32(startIpAddress);
|
||||
var endAddress = IpAddressToInt32(endIpAddress);
|
||||
var addressCount = endAddress - startAddress;
|
||||
|
||||
IPAddress[] addressArray = new IPAddress[addressCount + 1];
|
||||
int index = 0;
|
||||
for (int address = startAddress; address <= endAddress; address++)
|
||||
var addressArray = new IPAddress[addressCount + 1];
|
||||
var index = 0;
|
||||
for (var address = startAddress; address <= endAddress; address++)
|
||||
{
|
||||
addressArray[index] = IpAddressFromInt32(address);
|
||||
index++;
|
||||
@@ -229,26 +232,14 @@ namespace mRemoteNG.Tools
|
||||
|
||||
private static IPAddress IpAddressMin(IPAddress ipAddress1, IPAddress ipAddress2)
|
||||
{
|
||||
if (IpAddressCompare(ipAddress1, ipAddress2) < 0) // ipAddress1 < ipAddress2
|
||||
{
|
||||
return ipAddress1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ipAddress2;
|
||||
}
|
||||
// ipAddress1 < ipAddress2
|
||||
return IpAddressCompare(ipAddress1, ipAddress2) < 0 ? ipAddress1 : ipAddress2;
|
||||
}
|
||||
|
||||
private static IPAddress IpAddressMax(IPAddress ipAddress1, IPAddress ipAddress2)
|
||||
{
|
||||
if (IpAddressCompare(ipAddress1, ipAddress2) > 0) // ipAddress1 > ipAddress2
|
||||
{
|
||||
return ipAddress1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ipAddress2;
|
||||
}
|
||||
// ipAddress1 > ipAddress2
|
||||
return IpAddressCompare(ipAddress1, ipAddress2) > 0 ? ipAddress1 : ipAddress2;
|
||||
}
|
||||
|
||||
private static int IpAddressCompare(IPAddress ipAddress1, IPAddress ipAddress2)
|
||||
@@ -260,10 +251,10 @@ namespace mRemoteNG.Tools
|
||||
{
|
||||
if (ipAddress.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
{
|
||||
throw (new ArgumentException("ipAddress"));
|
||||
throw new ArgumentException("ipAddress");
|
||||
}
|
||||
|
||||
byte[] addressBytes = ipAddress.GetAddressBytes(); // in network order (big-endian)
|
||||
var addressBytes = ipAddress.GetAddressBytes(); // in network order (big-endian)
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
Array.Reverse(addressBytes); // to host order (little-endian)
|
||||
@@ -275,7 +266,7 @@ namespace mRemoteNG.Tools
|
||||
|
||||
private static IPAddress IpAddressFromInt32(int ipAddress)
|
||||
{
|
||||
byte[] addressBytes = BitConverter.GetBytes(ipAddress); // in host order
|
||||
var addressBytes = BitConverter.GetBytes(ipAddress); // in host order
|
||||
if (BitConverter.IsLittleEndian)
|
||||
{
|
||||
Array.Reverse(addressBytes); // to network order (big-endian)
|
||||
|
||||
@@ -60,9 +60,13 @@ namespace mRemoteNG.UI.Controls
|
||||
Opening += (sender, args) =>
|
||||
{
|
||||
AddExternalApps();
|
||||
if (_connectionTree.SelectedNode == null)
|
||||
{
|
||||
args.Cancel = true;
|
||||
return;
|
||||
}
|
||||
ShowHideMenuItems();
|
||||
};
|
||||
Closing += (sender, args) => EnableMenuItemsRecursive(Items);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
@@ -397,9 +401,6 @@ namespace mRemoteNG.UI.Controls
|
||||
|
||||
internal void ShowHideMenuItems()
|
||||
{
|
||||
if (_connectionTree.SelectedNode == null)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
Enabled = true;
|
||||
@@ -443,7 +444,9 @@ namespace mRemoteNG.UI.Controls
|
||||
_cMenTreeToolsSort.Enabled = false;
|
||||
_cMenTreeToolsExternalApps.Enabled = false;
|
||||
_cMenTreeDuplicate.Enabled = false;
|
||||
_cMenTreeRename.Enabled = true;
|
||||
_cMenTreeImport.Enabled = false;
|
||||
_cMenTreeExportFile.Enabled = false;
|
||||
_cMenTreeRename.Enabled = false;
|
||||
_cMenTreeDelete.Enabled = false;
|
||||
_cMenTreeMoveUp.Enabled = false;
|
||||
_cMenTreeMoveDown.Enabled = false;
|
||||
@@ -498,6 +501,8 @@ namespace mRemoteNG.UI.Controls
|
||||
_cMenTreeDelete.Enabled = false;
|
||||
_cMenTreeMoveUp.Enabled = false;
|
||||
_cMenTreeMoveDown.Enabled = false;
|
||||
_cMenTreeImport.Enabled = false;
|
||||
_cMenTreeExportFile.Enabled = false;
|
||||
}
|
||||
|
||||
internal void ShowHideMenuItemsForConnectionNode(ConnectionInfo connectionInfo)
|
||||
|
||||
@@ -15,11 +15,14 @@ using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
public partial class ConnectionTree : TreeListView, IConnectionTree
|
||||
public partial class ConnectionTree : TreeListView, IConnectionTree
|
||||
{
|
||||
private ConnectionTreeModel _connectionTreeModel;
|
||||
private readonly ConnectionTreeDragAndDropHandler _dragAndDropHandler = new ConnectionTreeDragAndDropHandler();
|
||||
private readonly PuttySessionsManager _puttySessionsManager = PuttySessionsManager.Instance;
|
||||
private bool _nodeInEditMode;
|
||||
private bool _allowEdit;
|
||||
private ConnectionContextMenu _contextMenu;
|
||||
|
||||
public ConnectionInfo SelectedNode => (ConnectionInfo) SelectedObject;
|
||||
|
||||
@@ -58,6 +61,8 @@ namespace mRemoteNG.UI.Controls
|
||||
SmallImageList = imageList.GetImageList();
|
||||
AddColumns(imageList.ImageGetter);
|
||||
LinkModelToView();
|
||||
_contextMenu = new ConnectionContextMenu(this);
|
||||
ContextMenuStrip = _contextMenu;
|
||||
SetupDropSink();
|
||||
SetEventHandlers();
|
||||
}
|
||||
@@ -90,23 +95,56 @@ namespace mRemoteNG.UI.Controls
|
||||
Collapsed += (sender, args) =>
|
||||
{
|
||||
var container = args.Model as ContainerInfo;
|
||||
if (container != null)
|
||||
container.IsExpanded = false;
|
||||
};
|
||||
if (container == null) return;
|
||||
container.IsExpanded = false;
|
||||
AutoResizeColumn(Columns[0]);
|
||||
};
|
||||
Expanded += (sender, args) =>
|
||||
{
|
||||
var container = args.Model as ContainerInfo;
|
||||
if (container != null)
|
||||
container.IsExpanded = true;
|
||||
};
|
||||
if (container == null) return;
|
||||
container.IsExpanded = true;
|
||||
AutoResizeColumn(Columns[0]);
|
||||
};
|
||||
SelectionChanged += tvConnections_AfterSelect;
|
||||
MouseDoubleClick += OnMouse_DoubleClick;
|
||||
MouseClick += OnMouse_SingleClick;
|
||||
CellToolTipShowing += tvConnections_CellToolTipShowing;
|
||||
ModelCanDrop += _dragAndDropHandler.HandleEvent_ModelCanDrop;
|
||||
ModelDropped += _dragAndDropHandler.HandleEvent_ModelDropped;
|
||||
BeforeLabelEdit += OnBeforeLabelEdit;
|
||||
AfterLabelEdit += OnAfterLabelEdit;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resizes the given column to ensure that all content is shown
|
||||
/// </summary>
|
||||
private void AutoResizeColumn(ColumnHeader column)
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke((MethodInvoker) (() => AutoResizeColumn(column)));
|
||||
return;
|
||||
}
|
||||
|
||||
var longestIndentationAndTextWidth = int.MinValue;
|
||||
var horizontalScrollOffset = LowLevelScrollPosition.X;
|
||||
const int padding = 10;
|
||||
|
||||
for (var i = 0; i < Items.Count; i++)
|
||||
{
|
||||
var rowIndentation = Items[i].Position.X;
|
||||
var rowTextWidth = TextRenderer.MeasureText(Items[i].Text, Font).Width;
|
||||
|
||||
longestIndentationAndTextWidth = Math.Max(rowIndentation + rowTextWidth, longestIndentationAndTextWidth);
|
||||
}
|
||||
|
||||
column.Width = longestIndentationAndTextWidth +
|
||||
SmallImageSize.Width +
|
||||
horizontalScrollOffset +
|
||||
padding;
|
||||
}
|
||||
|
||||
private void PopulateTreeView()
|
||||
{
|
||||
UnregisterModelUpdateHandlers();
|
||||
@@ -114,7 +152,8 @@ namespace mRemoteNG.UI.Controls
|
||||
RegisterModelUpdateHandlers();
|
||||
NodeSearcher = new NodeSearcher(ConnectionTreeModel);
|
||||
ExecutePostSetupActions();
|
||||
}
|
||||
AutoResizeColumn(Columns[0]);
|
||||
}
|
||||
|
||||
private void RegisterModelUpdateHandlers()
|
||||
{
|
||||
@@ -137,13 +176,17 @@ namespace mRemoteNG.UI.Controls
|
||||
|
||||
private void HandleCollectionPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
|
||||
{
|
||||
//TODO for some reason property changed events are getting triggered twice for each changed property. should be just once. cant find source of duplication
|
||||
// for some reason property changed events are getting triggered twice for each changed property. should be just once. cant find source of duplication
|
||||
// Removed "TO DO" from above comment. Per #142 it apperas that this no longer occurs with ObjectListView 2.9.1
|
||||
var property = propertyChangedEventArgs.PropertyName;
|
||||
if (property != "Name" && property != "OpenConnections") return;
|
||||
var senderAsConnectionInfo = sender as ConnectionInfo;
|
||||
if (senderAsConnectionInfo != null)
|
||||
RefreshObject(senderAsConnectionInfo);
|
||||
}
|
||||
if (senderAsConnectionInfo == null)
|
||||
return;
|
||||
|
||||
RefreshObject(senderAsConnectionInfo);
|
||||
AutoResizeColumn(Columns[0]);
|
||||
}
|
||||
|
||||
private void ExecutePostSetupActions()
|
||||
{
|
||||
@@ -201,11 +244,12 @@ namespace mRemoteNG.UI.Controls
|
||||
|
||||
private void AddNode(ConnectionInfo newNode)
|
||||
{
|
||||
if (SelectedNode == null) return;
|
||||
// use root node if no node is selected
|
||||
ConnectionInfo parentNode = SelectedNode ?? GetRootConnectionNode();
|
||||
DefaultConnectionInfo.Instance.SaveTo(newNode);
|
||||
DefaultConnectionInheritance.Instance.SaveTo(newNode.Inheritance);
|
||||
var selectedContainer = SelectedNode as ContainerInfo;
|
||||
var parent = selectedContainer ?? SelectedNode?.Parent;
|
||||
var selectedContainer = parentNode as ContainerInfo;
|
||||
var parent = selectedContainer ?? parentNode.Parent;
|
||||
newNode.SetParent(parent);
|
||||
Expand(parent);
|
||||
SelectObject(newNode, true);
|
||||
@@ -222,8 +266,8 @@ namespace mRemoteNG.UI.Controls
|
||||
|
||||
public void RenameSelectedNode()
|
||||
{
|
||||
_allowEdit = true;
|
||||
SelectedItem.BeginEdit();
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
|
||||
public void DeleteSelectedNode()
|
||||
@@ -237,7 +281,8 @@ namespace mRemoteNG.UI.Controls
|
||||
private void HandleCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
|
||||
{
|
||||
RefreshObject(sender);
|
||||
}
|
||||
AutoResizeColumn(Columns[0]);
|
||||
}
|
||||
|
||||
private void tvConnections_AfterSelect(object sender, EventArgs e)
|
||||
{
|
||||
@@ -256,7 +301,7 @@ namespace mRemoteNG.UI.Controls
|
||||
if (mouseEventArgs.Clicks < 2) return;
|
||||
OLVColumn column;
|
||||
var listItem = GetItemAt(mouseEventArgs.X, mouseEventArgs.Y, out column);
|
||||
var clickedNode = listItem.RowObject as ConnectionInfo;
|
||||
var clickedNode = listItem?.RowObject as ConnectionInfo;
|
||||
if (clickedNode == null) return;
|
||||
DoubleClickHandler.Execute(clickedNode);
|
||||
}
|
||||
@@ -283,6 +328,41 @@ namespace mRemoteNG.UI.Controls
|
||||
Runtime.MessageCollector.AddExceptionStackTrace("tvConnections_MouseMove (UI.Window.ConnectionTreeWindow) failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnBeforeLabelEdit(object sender, LabelEditEventArgs e)
|
||||
{
|
||||
if (_nodeInEditMode || !(sender is ConnectionTree))
|
||||
return;
|
||||
|
||||
if (!_allowEdit || SelectedNode is PuttySessionInfo || SelectedNode is RootPuttySessionsNodeInfo)
|
||||
{
|
||||
e.CancelEdit = true;
|
||||
return;
|
||||
}
|
||||
|
||||
_nodeInEditMode = true;
|
||||
_contextMenu.DisableShortcutKeys();
|
||||
}
|
||||
|
||||
private void OnAfterLabelEdit(object sender, LabelEditEventArgs e)
|
||||
{
|
||||
if (!_nodeInEditMode)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
_contextMenu.EnableShortcutKeys();
|
||||
ConnectionTreeModel.RenameNode(SelectedNode, e.Label);
|
||||
_nodeInEditMode = false;
|
||||
_allowEdit = false;
|
||||
Windows.ConfigForm.SelectedTreeNode = SelectedNode;
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace("tvConnections_AfterLabelEdit (UI.Window.ConnectionTreeWindow) failed", ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,10 @@ namespace mRemoteNG.UI.Controls
|
||||
public NameColumn(ImageGetterDelegate imageGetterDelegate)
|
||||
{
|
||||
AspectName = "Name";
|
||||
FillsFreeSpace = true;
|
||||
IsButton = true;
|
||||
FillsFreeSpace = false;
|
||||
AspectGetter = item => ((ConnectionInfo) item).Name;
|
||||
ImageGetter = imageGetterDelegate;
|
||||
AutoCompleteEditor = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,10 +78,10 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
radCredentialsCustom.Checked = true;
|
||||
}
|
||||
|
||||
txtCredentialsUsername.Text = Convert.ToString(Settings.Default.DefaultUsername);
|
||||
txtCredentialsUsername.Text = Settings.Default.DefaultUsername;
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
txtCredentialsPassword.Text = cryptographyProvider.Decrypt(Convert.ToString(Settings.Default.DefaultPassword), Runtime.EncryptionKey);
|
||||
txtCredentialsDomain.Text = Convert.ToString(Settings.Default.DefaultDomain);
|
||||
txtCredentialsPassword.Text = cryptographyProvider.Decrypt(Settings.Default.DefaultPassword, Runtime.EncryptionKey);
|
||||
txtCredentialsDomain.Text = Settings.Default.DefaultDomain;
|
||||
|
||||
if (Settings.Default.ConfirmCloseConnection == (int) ConfirmCloseEnum.Never)
|
||||
{
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace mRemoteNG.UI.Forms
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private MultiSSHController _multiSSHController ;
|
||||
|
||||
|
||||
private frmMain()
|
||||
{
|
||||
_showFullPathInTitle = Settings.Default.ShowCompleteConsPathInTitle;
|
||||
@@ -189,8 +190,9 @@ namespace mRemoteNG.UI.Forms
|
||||
// Create gui config load and save objects
|
||||
var settingsLoader = new SettingsLoader(this);
|
||||
settingsLoader.LoadSettings();
|
||||
|
||||
ApplyLanguage();
|
||||
LoadDefaultConnectionInfo();
|
||||
|
||||
ApplyLanguage();
|
||||
PopulateQuickConnectProtocolMenu();
|
||||
ThemeManager.ThemeChanged += ApplyThemes;
|
||||
ApplyThemes();
|
||||
@@ -205,6 +207,9 @@ namespace mRemoteNG.UI.Forms
|
||||
Runtime.NewConnections(Runtime.GetStartupConnectionFileName());
|
||||
}
|
||||
|
||||
if (Settings.Default.ResetPanels)
|
||||
SetDefaultLayout();
|
||||
|
||||
Runtime.LoadConnections();
|
||||
|
||||
Windows.TreePanel.Focus();
|
||||
@@ -223,6 +228,12 @@ namespace mRemoteNG.UI.Forms
|
||||
ConnectionTreeWindow = Windows.TreeForm;
|
||||
}
|
||||
|
||||
private void LoadDefaultConnectionInfo()
|
||||
{
|
||||
DefaultConnectionInfo.Instance.LoadFrom(Settings.Default, a => "ConDefault" + a);
|
||||
DefaultConnectionInheritance.Instance.LoadFrom(Settings.Default, a => "InhDefault" + a);
|
||||
}
|
||||
|
||||
private void ApplyLanguage()
|
||||
{
|
||||
mMenFile.Text = Language.strMenuFile;
|
||||
@@ -456,13 +467,14 @@ namespace mRemoteNG.UI.Forms
|
||||
var extA = (ExternalTool)((ToolStripButton)sender).Tag;
|
||||
|
||||
var selectedTreeNode = Windows.TreeForm.SelectedNode;
|
||||
if (selectedTreeNode.GetTreeNodeType() == TreeNodeType.Connection | selectedTreeNode.GetTreeNodeType() == TreeNodeType.PuttySession)
|
||||
if (selectedTreeNode != null && selectedTreeNode.GetTreeNodeType() == TreeNodeType.Connection | selectedTreeNode.GetTreeNodeType() == TreeNodeType.PuttySession)
|
||||
{
|
||||
extA.Start(selectedTreeNode);
|
||||
}
|
||||
else
|
||||
{
|
||||
extA.Start();
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "No connection was selected, external tool may return errors.", true);
|
||||
extA.Start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1090,30 +1102,37 @@ namespace mRemoteNG.UI.Forms
|
||||
var control = FromChildHandle(NativeMethods.WindowFromPoint(MousePosition));
|
||||
if (control != null)
|
||||
{
|
||||
// Let TreeViews and ComboBoxes get focus but don't simulate a mouse event
|
||||
if (control is TreeView || control is ComboBox)
|
||||
{ }
|
||||
else
|
||||
{
|
||||
if (control.CanSelect || control is MenuStrip || control is ToolStrip || control is Crownwood.Magic.Controls.TabControl || control is Crownwood.Magic.Controls.InertButton)
|
||||
{
|
||||
// Simulate a mouse event since one wasn't generated by Windows
|
||||
var clientMousePosition = control.PointToClient(MousePosition);
|
||||
var temp_wLow = clientMousePosition.X;
|
||||
var temp_wHigh = clientMousePosition.Y;
|
||||
NativeMethods.SendMessage(control.Handle, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, (IntPtr)NativeMethods.MAKELPARAM(ref temp_wLow, ref temp_wHigh));
|
||||
clientMousePosition.X = temp_wLow;
|
||||
clientMousePosition.Y = temp_wHigh;
|
||||
control.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This handles activations from clicks that did not start a size/move operation
|
||||
ActivateConnection();
|
||||
}
|
||||
break;
|
||||
case NativeMethods.WM_WINDOWPOSCHANGED:
|
||||
// Let TreeViews get focus but don't simulate a mouse event
|
||||
if (control is TreeView ||
|
||||
control is ComboBox ||
|
||||
control is TextBox)
|
||||
{
|
||||
control.Focus();
|
||||
}
|
||||
else if (control.CanSelect ||
|
||||
control is MenuStrip ||
|
||||
control is ToolStrip ||
|
||||
control is Crownwood.Magic.Controls.TabControl ||
|
||||
control is Crownwood.Magic.Controls.InertButton)
|
||||
{
|
||||
// Simulate a mouse event since one wasn't generated by Windows
|
||||
var clientMousePosition = control.PointToClient(MousePosition);
|
||||
var temp_wLow = clientMousePosition.X;
|
||||
var temp_wHigh = clientMousePosition.Y;
|
||||
NativeMethods.SendMessage(control.Handle, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, (IntPtr)NativeMethods.MAKELPARAM(ref temp_wLow, ref temp_wHigh));
|
||||
clientMousePosition.X = temp_wLow;
|
||||
clientMousePosition.Y = temp_wHigh;
|
||||
control.Focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
// This handles activations from clicks that did not start a size/move operation
|
||||
ActivateConnection();
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NativeMethods.WM_WINDOWPOSCHANGED:
|
||||
// Ignore this message if the window wasn't activated
|
||||
var windowPos = (NativeMethods.WINDOWPOS)Marshal.PtrToStructure(m.LParam, typeof(NativeMethods.WINDOWPOS));
|
||||
if ((windowPos.flags & NativeMethods.SWP_NOACTIVATE) != 0)
|
||||
|
||||
@@ -476,7 +476,9 @@ namespace mRemoteNG.UI.Window
|
||||
_pGrid.SelectedObject = propertyGridObject;
|
||||
|
||||
_btnShowProperties.Enabled = true;
|
||||
_btnShowInheritance.Enabled = gridObjectAsContainerInfo.Parent != null;
|
||||
_btnShowInheritance.Enabled =
|
||||
gridObjectAsContainerInfo.Parent != null &&
|
||||
!(gridObjectAsContainerInfo.Parent is RootNodeInfo);
|
||||
_btnShowDefaultProperties.Enabled = false;
|
||||
_btnShowDefaultInheritance.Enabled = false;
|
||||
_btnIcon.Enabled = true;
|
||||
@@ -492,7 +494,10 @@ namespace mRemoteNG.UI.Window
|
||||
_pGrid.SelectedObject = propertyGridObject;
|
||||
|
||||
_btnShowProperties.Enabled = true;
|
||||
_btnShowInheritance.Enabled = gridObjectAsConnectionInfo.Parent != null;
|
||||
_btnShowInheritance.Enabled =
|
||||
!(gridObjectAsConnectionInfo is PuttySessionInfo) &&
|
||||
gridObjectAsConnectionInfo.Parent != null &&
|
||||
!(gridObjectAsConnectionInfo.Parent is RootNodeInfo);
|
||||
_btnShowDefaultProperties.Enabled = false;
|
||||
_btnShowDefaultInheritance.Enabled = false;
|
||||
_btnIcon.Enabled = true;
|
||||
|
||||
14
mRemoteV1/UI/Window/ConnectionTreeWindow.Designer.cs
generated
14
mRemoteV1/UI/Window/ConnectionTreeWindow.Designer.cs
generated
@@ -1,5 +1,7 @@
|
||||
|
||||
|
||||
using mRemoteNG.Tree;
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
{
|
||||
public partial class ConnectionTreeWindow : BaseWindow
|
||||
@@ -19,6 +21,9 @@ namespace mRemoteNG.UI.Window
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
mRemoteNG.Tree.TreeNodeCompositeClickHandler treeNodeCompositeClickHandler1 = new mRemoteNG.Tree.TreeNodeCompositeClickHandler();
|
||||
mRemoteNG.Tree.AlwaysConfirmYes alwaysConfirmYes1 = new mRemoteNG.Tree.AlwaysConfirmYes();
|
||||
mRemoteNG.Tree.TreeNodeCompositeClickHandler treeNodeCompositeClickHandler2 = new mRemoteNG.Tree.TreeNodeCompositeClickHandler();
|
||||
this.olvConnections = new mRemoteNG.UI.Controls.ConnectionTree();
|
||||
this.pnlConnections = new System.Windows.Forms.Panel();
|
||||
this.PictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
@@ -44,22 +49,31 @@ namespace mRemoteNG.UI.Window
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.olvConnections.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.olvConnections.CellEditUseWholeCell = false;
|
||||
this.olvConnections.ConnectionTreeModel = new ConnectionTreeModel();
|
||||
this.olvConnections.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
treeNodeCompositeClickHandler1.ClickHandlers = new mRemoteNG.Tree.ITreeNodeClickHandler[0];
|
||||
this.olvConnections.DoubleClickHandler = treeNodeCompositeClickHandler1;
|
||||
this.olvConnections.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||
this.olvConnections.HideSelection = false;
|
||||
this.olvConnections.IsSimpleDragSource = true;
|
||||
this.olvConnections.IsSimpleDropSink = true;
|
||||
this.olvConnections.LabelEdit = true;
|
||||
this.olvConnections.Location = new System.Drawing.Point(0, 0);
|
||||
this.olvConnections.MultiSelect = false;
|
||||
this.olvConnections.Name = "olvConnections";
|
||||
this.olvConnections.NodeDeletionConfirmer = alwaysConfirmYes1;
|
||||
this.olvConnections.PostSetupActions = new mRemoteNG.UI.Controls.IConnectionTreeDelegate[0];
|
||||
this.olvConnections.SelectedBackColor = System.Drawing.SystemColors.Highlight;
|
||||
this.olvConnections.SelectedForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
this.olvConnections.ShowGroups = false;
|
||||
treeNodeCompositeClickHandler2.ClickHandlers = new mRemoteNG.Tree.ITreeNodeClickHandler[0];
|
||||
this.olvConnections.SingleClickHandler = treeNodeCompositeClickHandler2;
|
||||
this.olvConnections.Size = new System.Drawing.Size(192, 410);
|
||||
this.olvConnections.TabIndex = 20;
|
||||
this.olvConnections.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight;
|
||||
this.olvConnections.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
this.olvConnections.UseCompatibleStateImageBehavior = false;
|
||||
this.olvConnections.UseOverlays = false;
|
||||
this.olvConnections.View = System.Windows.Forms.View.Details;
|
||||
this.olvConnections.VirtualMode = true;
|
||||
//
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.UI.Controls;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
@@ -15,10 +16,8 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
public partial class ConnectionTreeWindow
|
||||
{
|
||||
private readonly ConnectionContextMenu _contextMenu;
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
|
||||
|
||||
public ConnectionInfo SelectedNode => olvConnections.SelectedNode;
|
||||
|
||||
public ConnectionTree ConnectionTree
|
||||
@@ -32,8 +31,6 @@ namespace mRemoteNG.UI.Window
|
||||
WindowType = WindowType.Tree;
|
||||
DockPnl = panel;
|
||||
InitializeComponent();
|
||||
_contextMenu = new ConnectionContextMenu(olvConnections);
|
||||
olvConnections.ContextMenuStrip = _contextMenu;
|
||||
SetMenuEventHandlers();
|
||||
SetConnectionTreeEventHandlers();
|
||||
Settings.Default.PropertyChanged += (sender, args) => SetConnectionTreeEventHandlers();
|
||||
@@ -84,8 +81,6 @@ namespace mRemoteNG.UI.Window
|
||||
private void SetConnectionTreeEventHandlers()
|
||||
{
|
||||
olvConnections.NodeDeletionConfirmer = new SelectedConnectionDeletionConfirmer(olvConnections, MessageBox.Show);
|
||||
olvConnections.BeforeLabelEdit += tvConnections_BeforeLabelEdit;
|
||||
olvConnections.AfterLabelEdit += tvConnections_AfterLabelEdit;
|
||||
olvConnections.KeyDown += tvConnections_KeyDown;
|
||||
olvConnections.KeyPress += tvConnections_KeyPress;
|
||||
SetTreePostSetupActions();
|
||||
@@ -171,26 +166,6 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
|
||||
private void tvConnections_BeforeLabelEdit(object sender, LabelEditEventArgs e)
|
||||
{
|
||||
_contextMenu.DisableShortcutKeys();
|
||||
}
|
||||
|
||||
private void tvConnections_AfterLabelEdit(object sender, LabelEditEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
_contextMenu.EnableShortcutKeys();
|
||||
ConnectionTree.ConnectionTreeModel.RenameNode(SelectedNode, e.Label);
|
||||
Windows.ConfigForm.SelectedTreeNode = SelectedNode;
|
||||
Runtime.SaveConnectionsAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace("tvConnections_AfterLabelEdit (UI.Window.ConnectionTreeWindow) failed", ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Search
|
||||
|
||||
@@ -123,10 +123,9 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProtocolType protocol = (ProtocolType)StringToEnum(typeof(ProtocolType), Convert.ToString(cbProtocol.SelectedItem));
|
||||
var protocol = (ProtocolType)StringToEnum(typeof(ProtocolType), Convert.ToString(cbProtocol.SelectedItem));
|
||||
importSelectedHosts(protocol);
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -168,8 +167,8 @@ namespace mRemoteNG.UI.Window
|
||||
SwitchButtonText();
|
||||
lvHosts.Items.Clear();
|
||||
|
||||
System.Net.IPAddress ipAddressStart = System.Net.IPAddress.Parse(ipStart.Text);
|
||||
System.Net.IPAddress ipAddressEnd = System.Net.IPAddress.Parse(ipEnd.Text);
|
||||
var ipAddressStart = System.Net.IPAddress.Parse(ipStart.Text);
|
||||
var ipAddressEnd = System.Net.IPAddress.Parse(ipEnd.Text);
|
||||
|
||||
_portScanner = new PortScanner(ipAddressStart, ipAddressEnd, (int) portStart.Value, (int) portEnd.Value);
|
||||
|
||||
@@ -198,9 +197,14 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
prgBar.Maximum = 100;
|
||||
prgBar.Value = 0;
|
||||
|
||||
/* If there are still hosts timing out, we might call PortScannerHostScannedDelegate after the import which will throw exceptions...
|
||||
* Disable the import button until after the scan is complete
|
||||
*/
|
||||
btnImport.Enabled = !_scanning;
|
||||
}
|
||||
|
||||
private static void PortScanner_BeginHostScan(string host)
|
||||
|
||||
private static void PortScanner_BeginHostScan(string host)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Scanning " + host, true);
|
||||
}
|
||||
@@ -210,13 +214,13 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new PortScannerHostScannedDelegate(PortScanner_HostScanned), new object[] {host, scannedCount, totalCount});
|
||||
Invoke(new PortScannerHostScannedDelegate(PortScanner_HostScanned), host, scannedCount, totalCount);
|
||||
return;
|
||||
}
|
||||
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Host scanned " + host.HostIp, true);
|
||||
|
||||
ListViewItem listViewItem = host.ToListViewItem();
|
||||
var listViewItem = host.ToListViewItem();
|
||||
if (listViewItem != null)
|
||||
{
|
||||
lvHosts.Items.Add(listViewItem);
|
||||
@@ -232,7 +236,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
if (InvokeRequired)
|
||||
{
|
||||
Invoke(new PortScannerScanComplete(PortScanner_ScanComplete), new object[] {hosts});
|
||||
Invoke(new PortScannerScanComplete(PortScanner_ScanComplete), hosts);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -245,6 +249,13 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
private void importSelectedHosts(ProtocolType protocol)
|
||||
{
|
||||
|
||||
if (lvHosts.SelectedItems.Count < 1)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, "importSelectedHosts: Could not import host(s) from port scan context menu. No hosts selected.");
|
||||
return;
|
||||
}
|
||||
|
||||
var hosts = new List<ScanHost>();
|
||||
foreach (ListViewItem item in lvHosts.SelectedItems)
|
||||
{
|
||||
@@ -257,11 +268,21 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
if (hosts.Count < 1)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, "Could not import host(s) from port scan context menu");
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, "importSelectedHosts: Could not import host(s) from port scan context menu", true);
|
||||
return;
|
||||
}
|
||||
|
||||
var selectedTreeNodeAsContainer = Windows.TreeForm.SelectedNode as ContainerInfo ?? Windows.TreeForm.SelectedNode.Parent;
|
||||
ContainerInfo selectedTreeNodeAsContainer;
|
||||
if (Windows.TreeForm.SelectedNode == null)
|
||||
{
|
||||
selectedTreeNodeAsContainer = Windows.TreeForm.ConnectionTree.GetRootConnectionNode();
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "importSelectedHosts: No node selected. Using Root Node.", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedTreeNodeAsContainer = Windows.TreeForm.SelectedNode as ContainerInfo ?? Windows.TreeForm.SelectedNode.Parent;
|
||||
}
|
||||
|
||||
Import.ImportFromPortScan(hosts, protocol, selectedTreeNodeAsContainer);
|
||||
}
|
||||
|
||||
|
||||
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