Skip to content

Commit a66787b

Browse files
Update Find-PSMDType.ps1
1 parent a128514 commit a66787b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PSModuleDevelopment/functions/assembly/Find-PSMDType.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
3030
.PARAMETER Enum
3131
Whether the type to find must be an enumeration.
32+
33+
.PARAMETER Static
34+
Whether the type to find must be static.
3235
3336
.PARAMETER Implements
3437
Whether the type to find must implement this interface
@@ -118,7 +121,7 @@
118121
if ($boundEnum -and ($Enum -ne $type.IsEnum)) { continue }
119122
if ($InheritsFrom -and ($type.BaseType.FullName -notlike $InheritsFrom)) { continue }
120123
if ($Attribute -and ($type.CustomAttributes.AttributeType.Name -notlike $Attribute)) { continue }
121-
if ($boundStatic -and -not($type.IsAbstract -and $type.IsSealed)) { continue }
124+
if ($boundStatic -and ($Static -ne ($type.IsAbstract -and $type.IsSealed))) { continue }
122125

123126
$type
124127
}

0 commit comments

Comments
 (0)