Browse Source

PowerShell ISE path detection fallback

pull/976/head
Christoph Wille 8 years ago
parent
commit
4373a9341f
  1. 12
      ICSharpCode.Decompiler.PowerShell/Demo.ps1

12
ICSharpCode.Decompiler.PowerShell/Demo.ps1

@ -1,5 +1,13 @@
Import-Module .\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.Powershell.dll
$decompiler = Get-Decompiler .\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.Powershell.dll
$basePath = $PSScriptRoot
if ([string]::IsNullOrEmpty($basePath))
{
$basePath = Split-Path -parent $psISE.CurrentFile.Fullpath
}
$modulePath = $basePath + '\bin\Debug\netstandard2.0\ICSharpCode.Decompiler.Powershell.dll'
Import-Module $modulePath
$decompiler = Get-Decompiler $modulePath
$classes = Get-DecompiledTypes $decompiler -Types class
$classes.Count

Loading…
Cancel
Save