Skip to content

Commit

Permalink
feat: Namespace.get_Type ( Fixes #1143 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Jun 29, 2024
1 parent 3386d90 commit d3e0bbf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Types/Namespace/get_Type.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<#
.SYNOPSIS
Gets the types in the namespace.
.DESCRIPTION
Gets all the types in the namespace.
This is, gets all the compiled .NET types in the namespace.
#>
foreach ($assembly in [AppDomain]::CurrentDomain.GetAssemblies()) {
foreach ($typeInAssembly in
@(try { $assembly.GetTypes() } catch { continue })
) {
if ($typeInAssembly.FullName -match $this.Pattern) {
$typeInAssembly
}
}
}

0 comments on commit d3e0bbf

Please sign in to comment.