Click or drag to resize

GuardIsDefinedT Method (T, String, T)

[This is preliminary documentation and is subject to change.]

Checks if enumValue is defined on T and is defined in allowedValues

Namespace:  CSInfrastructure.CodeContracts
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static T IsDefined<T>(
	T enumValue,
	string paramName,
	T[] allowedValues
)
where T : Enum

Parameters

enumValue
Type: T
The enum value to check
paramName
Type: SystemString
The name of the parameter being checked
allowedValues
Type: T
A list of allowed enum values

Type Parameters

T
The type of enum

Return Value

Type: T
The enum value being checked
Exceptions
ExceptionCondition
InvalidEnumArgumentExceptionThrow when enumValue is not defined on T or its not defined in allowedValues
See Also