Downloads:

790

Downloads of v 0.0.0:

550

Last Update:

17 Apr 2016

Package Maintainer(s):

Software Author(s):

  • Akira Sugiura

Tags:

tdd isolation mock mocks mocking fake fakes faking unittest unittesting

Get Prig Indirection Stub Setting plugin for ILSpy

0.0.0 | Updated: 17 Apr 2016

Downloads:

790

Downloads of v 0.0.0:

550

Maintainer(s):

Software Author(s):

  • Akira Sugiura

Get Prig Indirection Stub Setting plugin for ILSpy 0.0.0

This Package Contains an Exempted Check

1 Test Passing and 1 Exempted Test


Validation Testing Passed


Verification Testing Exempt:

Requires Visual Studio

To install Get Prig Indirection Stub Setting plugin for ILSpy, run the following command from the command line or from PowerShell:

>

To upgrade Get Prig Indirection Stub Setting plugin for ILSpy, run the following command from the command line or from PowerShell:

>

To uninstall Get Prig Indirection Stub Setting plugin for ILSpy, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade ilspy.getprigindirectionstubsetting.plugin -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade ilspy.getprigindirectionstubsetting.plugin -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure ilspy.getprigindirectionstubsetting.plugin installed
  win_chocolatey:
    name: ilspy.getprigindirectionstubsetting.plugin
    state: present
    version: 0.0.0
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'ilspy.getprigindirectionstubsetting.plugin' do
  action    :install
  version  '0.0.0'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: ilspy.getprigindirectionstubsetting.plugin,
    Version: 0.0.0,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller ilspy.getprigindirectionstubsetting.plugin
{
   Name     = 'ilspy.getprigindirectionstubsetting.plugin'
   Ensure   = 'Present'
   Version  = '0.0.0'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'ilspy.getprigindirectionstubsetting.plugin':
  provider => 'chocolatey',
  ensure   => '0.0.0',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install ilspy.getprigindirectionstubsetting.plugin version="0.0.0" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator ferventcoder on 18 Apr 2016.

Description

This is a ILSpy plugin that makes more easy to get Prig Indirection Stub Setting.


tools\ChocolateyInstall.ps1
# 
# File: ChocolateyInstall.ps1
# 
# Author: Akira Sugiura ([email protected])
# 
# 
# Copyright (c) 2016 Akira Sugiura
#  
#  This software is MIT License.
#  
#  Permission is hereby granted, free of charge, to any person obtaining a copy
#  of this software and associated documentation files (the "Software"), to deal
#  in the Software without restriction, including without limitation the rights
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#  copies of the Software, and to permit persons to whom the Software is
#  furnished to do so, subject to the following conditions:
#  
#  The above copyright notice and this permission notice shall be included in
#  all copies or substantial portions of the Software.
#  
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#  THE SOFTWARE.
#



$destination = [System.IO.Path]::Combine($env:ChocolateyInstall, 'lib\ilspy\tools\')

$path = [System.IO.Path]::Combine($env:ChocolateyInstall, 'lib\ILSpy.GetPrigIndirectionStubSetting.Plugin\tools\ILSpy.GetPrigIndirectionStubSetting.Plugin.dll')
Copy-Item $path $destination -Force

$path = [System.IO.Path]::Combine($env:ChocolateyInstall, 'lib\ILSpy.GetPrigIndirectionStubSetting.Plugin\tools\ILSpy.GetPrigIndirectionStubSetting.Common.dll')
Copy-Item $path $destination -Force

$path = [System.IO.Path]::Combine($env:ChocolateyInstall, 'lib\ILSpy.GetPrigIndirectionStubSetting.Plugin\tools\Get-PrigIndirectionStubSetting.ps1')
Copy-Item $path $destination -Force
tools\ChocolateyUninstall.ps1
# 
# File: ChocolateyUninstall.ps1
# 
# Author: Akira Sugiura ([email protected])
# 
# 
# Copyright (c) 2016 Akira Sugiura
#  
#  This software is MIT License.
#  
#  Permission is hereby granted, free of charge, to any person obtaining a copy
#  of this software and associated documentation files (the "Software"), to deal
#  in the Software without restriction, including without limitation the rights
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#  copies of the Software, and to permit persons to whom the Software is
#  furnished to do so, subject to the following conditions:
#  
#  The above copyright notice and this permission notice shall be included in
#  all copies or substantial portions of the Software.
#  
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#  THE SOFTWARE.
#


$path = [System.IO.Path]::Combine($env:ChocolateyInstall, 'lib\ilspy\tools\ILSpy.GetPrigIndirectionStubSetting.Plugin.dll')
Remove-Item $path -Force

$path = [System.IO.Path]::Combine($env:ChocolateyInstall, 'lib\ilspy\tools\ILSpy.GetPrigIndirectionStubSetting.Common.dll')
Remove-Item $path -Force

$path = [System.IO.Path]::Combine($env:ChocolateyInstall, 'lib\ilspy\tools\Get-PrigIndirectionStubSetting.ps1')
Remove-Item $path -Force
tools\Get-PrigIndirectionStubSetting.ps1
# 
# File: Get-PrigIndirectionStubSetting.ps1
# 
# Author: Akira Sugiura ([email protected])
# 
# 
# Copyright (c) 2016 Akira Sugiura
#  
#  This software is MIT License.
#  
#  Permission is hereby granted, free of charge, to any person obtaining a copy
#  of this software and associated documentation files (the "Software"), to deal
#  in the Software without restriction, including without limitation the rights
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#  copies of the Software, and to permit persons to whom the Software is
#  furnished to do so, subject to the following conditions:
#  
#  The above copyright notice and this permission notice shall be included in
#  all copies or substantial portions of the Software.
#  
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#  THE SOFTWARE.
#

[CmdletBinding()]
param (
    [Parameter(Mandatory = $True)]
    [string]
    $MethodIdsPath, 

    [switch]
    $Core
)

Write-Verbose ('Method IDs Path          : {0}' -f $MethodIdsPath)



function InvokeCore {
    param (
        [Parameter(Mandatory = $True)]
        [string]
        $AssemblyLocation
    )

    [System.Reflection.ProcessorArchitecture]$osArch = 0
    $osArch = $(if ([System.IntPtr]::Size -eq 8) { 'Amd64' } else { 'X86' })
    Write-Verbose ('ILSpy running for: {0}' -f $osArch)

    [System.Reflection.ProcessorArchitecture]$asmArch = 0
    $asmName = prig dasm -assemblyfrom $AssemblyLocation | ConvertFrom-Csv
    $asmArch = $asmName.ProcessorArchitecture
    Write-Verbose ('Assembly Architecture: {0}' -f $asmArch)

    if ($osArch -eq 'X86') {
        if ($asmArch -match '(X86)|(MSIL)') {
            $powershell = [System.Environment]::ExpandEnvironmentVariables('%windir%\system32\WindowsPowerShell\v1.0\powershell.exe')
        }
    } elseif ($osArch -eq 'Amd64') {
        if ($asmArch -match '(Amd64)|(MSIL)') {
            $powershell = [System.Environment]::ExpandEnvironmentVariables('%windir%\system32\WindowsPowerShell\v1.0\powershell.exe')
        } elseif ($asmArch -eq 'X86') {
            $powershell = [System.Environment]::ExpandEnvironmentVariables('%windir%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe')
        }
    }
    if ($null -eq $powershell) {
        New-Object System.NotSupportedException ('Running ILSpy for {0} and loading {1} assembly is not supported.' -f $osArch, $asmArch) 
    }
    Write-Verbose ('PowerShell: {0}' -f $powershell)

    $imageRuntimeVer = $asmName.ImageRuntimeVersion
    Write-Verbose ('Image Runtime Version: {0}' -f $imageRuntimeVer)

    $argList = '-NoLogo', '-NoProfile', '-File', ".\Get-PrigIndirectionStubSetting.ps1", """$MethodIdsPath""", "-Core"
    if ($imageRuntimeVer -eq 'v2.0.50727') {
        $argList = '-Version', '2' + $argList
    }
    if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
        $argList += '-Verbose'
    }
    Write-Verbose ('Argument List: {0}' -f ($argList -join ' '))

    $outputsPath = [System.IO.Path]::GetTempFileName()
    $errorsPath = [System.IO.Path]::GetTempFileName()
    Start-Process $powershell $argList -Wait -WindowStyle 'Hidden' -RedirectStandardOutput $outputsPath -RedirectStandardError $errorsPath
    $errors = Get-Content $errorsPath
    Remove-Item $errorsPath -ErrorAction SilentlyContinue
    if (0 -lt $errors.Length) {
        throw New-Object System.InvalidOperationException ($errors -join "`r`n")
    }
    Remove-Item $MethodIdsPath -ErrorAction SilentlyContinue
    Get-Content $outputsPath
    Remove-Item $outputsPath -ErrorAction SilentlyContinue
}



function GetIndirectionStubSettingCore {
    param (
        [Parameter(Mandatory = $True)]
        [ILSpy.GetPrigIndirectionStubSetting.Common.ReflectionMethodId[]]
        $MethodIds
    )

    $inputObject = New-Object 'System.Collections.Generic.List[System.Reflection.MethodBase]'
    [System.Reflection.Assembly]$asm = $null
    $assemblyTypes = New-Object "System.Collections.Generic.Dictionary[int, Type]"
    $typeMethods = New-Object "System.Collections.Generic.Dictionary[Type, [System.Collections.Generic.Dictionary[int, System.Reflection.MethodBase]]]"
    foreach ($methodId in $MethodIds) {
        if ($null -eq $asm) {
            $asm = [System.Reflection.Assembly]::LoadFrom($methodId.AssemblyLocation)
            foreach ($type in $asm.GetTypes()) {
                $assemblyTypes[$type.MetadataToken] = $type
            }
        }
        $type = $assemblyTypes[$methodId.TypeDefToken]
        if (!$typeMethods.ContainsKey($type)) {
            $typeMethods[$type] = [System.Collections.Generic.Dictionary[int, System.Reflection.MethodBase]](
                                        New-Object "System.Collections.Generic.Dictionary[int, System.Reflection.MethodBase]")
            $members = $type.GetMembers([System.Reflection.BindingFlags]'Public, NonPublic, Static, Instance, DeclaredOnly')
            foreach ($member in $members) {
                if ($member -isnot [System.Reflection.MethodBase]) { continue }
                $methods = $typeMethods[$type]
                $methods[$member.MetadataToken] = $member
            }
        }
        $methods = $typeMethods[$type]
        $inputObject.Add($methods[$methodId.MethodDefToken])
    }

    Import-Module ([System.IO.Path]::Combine($env:URASANDESU_PRIG_PACKAGE_FOLDER, 'tools\Urasandesu.Prig'))
    if ($Host.UI.RawUI) {
        $rawUI = $Host.UI.RawUI
        $oldSize = $rawUI.BufferSize
        $typeName = $oldSize.GetType().FullName
        $newSize = New-Object $typeName (1024, $oldSize.Height)
        $rawUI.BufferSize = $newSize
    }
    $inputObject | Get-IndirectionStubSetting
}


[void][System.Reflection.Assembly]::LoadFrom((dir .\ILSpy.GetPrigIndirectionStubSetting.Common.dll).FullName)
try {
    $sr = New-Object System.IO.StreamReader $MethodIdsPath
    $serializer = New-Object System.Xml.Serialization.XmlSerializer ([ILSpy.GetPrigIndirectionStubSetting.Common.ReflectionMethodId[]])
    $methodIds = @($serializer.Deserialize($sr))
} finally {
    if ($null -ne $sr) {
        $sr.Dispose()
    }
}

if ($Core) {
    GetIndirectionStubSettingCore $methodIds
} else {
    InvokeCore $methodIds[0].AssemblyLocation
}
tools\ILSpy.GetPrigIndirectionStubSetting.Common.dll
md5: B41A3409A73315A3CDC1AC0391FDE0F4 | sha1: 0552A3B731CCE95956F29019F4F50A63C0F7EBD7 | sha256: 313691A47AE4F06F09AEDA39AE37867119F0373DB07F7A6FEBEA559FFF33E997 | sha512: B09D917E8652545122E7BF472F4D6C81DEFD952A0772C75747998758142018D88226E71859F6C1F6B7A7E4B731BE9193B6FC28F6CF2664520BC6DCC6568F6339
tools\ILSpy.GetPrigIndirectionStubSetting.Plugin.dll
md5: 7A96BB921DAEF1DB567962541443C840 | sha1: EB767C99D1796CB19E21932F20F714670A4F1EC1 | sha256: F3D4A402DDC22E8A98F305F335F14067B3D36815A9B428C18F1FABC814F25A18 | sha512: 3288541B0DDD46665AD05D5319E718D16C1CE8A991678A3AD5FE120F13E96B79982E85E312AC8698191A7A1479296AED88D2C32DA8C2379067C9F4A00E8A6690

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Get Prig Indirection Stub Setting plugin for ILSpy 0.0.0-alpha01 240 Monday, March 21, 2016 Exempted

Version 0.0.0

Version 0.0.0-alpha01

  • Initial release.

About more previous versions, please see https://github.com/urasandesu/ILSpy.GetPrigIndirectionStubSetting.Plugin/releases.


Discussion for the Get Prig Indirection Stub Setting plugin for ILSpy Package

Ground Rules:

  • This discussion is only about Get Prig Indirection Stub Setting plugin for ILSpy and the Get Prig Indirection Stub Setting plugin for ILSpy package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Get Prig Indirection Stub Setting plugin for ILSpy, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus