-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Namespace.get_Type ( Fixes #1143 )
- Loading branch information
James Brundage
committed
Jun 29, 2024
1 parent
3386d90
commit d3e0bbf
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} |