ArgumentGuardOneOfT Method |
Throws if enum value is not in the expected set.
Namespace:
KSPDev.ProcessingUtils
Assembly:
KSPDev_Utils.2.3 (in KSPDev_Utils.2.3.dll) Version: 2.3 for KSP v1
Syntaxpublic static void OneOf<T>(
T arg,
string argName,
T[] values,
string message = null,
Object context = null
)
Request Example
View SourceParameters
- arg
- Type: T
The argument value to check. - argName
- Type: SystemString
The argument name. - values
- Type: T
The acceptable values of the enum. - message (Optional)
- Type: SystemString
An optional message to present in the error. - context (Optional)
- Type: SystemObject
The optional "owner" object.
Type Parameters
- T
- Type of value to check.
ExceptionsException | Condition |
---|
ArgumentOutOfRangeException |
If the argument is not one of the specified.
|
See Also