Showing posts with label Query .NET Collections. Show all posts
Showing posts with label Query .NET Collections. Show all posts

Friday, May 9, 2008

Use these two functions to query the supported assemblies [GAC] and .NET Collections (from Windows Powershell in Action, Bruce Payette)

function Get-Assemblies {[AppDomain]::CurrentDomain.GetAssemblies()}

function Get-Types ($Pattern=".") { Get-Assemblies | %{ $_.GetExportedTypes() } | where {$_ -match $Pattern} }

Get-Types System
Get-Types System.Collections
Get-Types System.Collections | more
Get-Types System.Collections.Specialized | more
Get-Types System.Collections.Specialized.StringDictionary
Get-Types System.Collections.Specialized.StringDictionary | gm
Get-Types System.Collections.Specialized.StringDictionary | gm | more