Skip to content

Commit d3e0bbf

Browse files
author
James Brundage
committed
feat: Namespace.get_Type ( Fixes #1143 )
1 parent 3386d90 commit d3e0bbf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Types/Namespace/get_Type.ps1

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<#
2+
.SYNOPSIS
3+
Gets the types in the namespace.
4+
.DESCRIPTION
5+
Gets all the types in the namespace.
6+
7+
This is, gets all the compiled .NET types in the namespace.
8+
#>
9+
foreach ($assembly in [AppDomain]::CurrentDomain.GetAssemblies()) {
10+
foreach ($typeInAssembly in
11+
@(try { $assembly.GetTypes() } catch { continue })
12+
) {
13+
if ($typeInAssembly.FullName -match $this.Pattern) {
14+
$typeInAssembly
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)