EnumModelCreateFromEnumT Method |
Creates a sorted array of records for an enum.
Namespace: VirtualRadar.Interface.ViewAssembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static EnumModel[] CreateFromEnum<T>(
Func<T, string> getDescription,
bool sortByDescription = true,
Func<T, bool> filter = null
)
where T : struct, new()
Public Shared Function CreateFromEnum(Of T As {Structure, New}) (
getDescription As Func(Of T, String),
Optional sortByDescription As Boolean = true,
Optional filter As Func(Of T, Boolean) = Nothing
) As EnumModel()
public:
generic<typename T>
where T : value class, gcnew()
static array<EnumModel^>^ CreateFromEnum(
Func<T, String^>^ getDescription,
bool sortByDescription = true,
Func<T, bool>^ filter = nullptr
)
static member CreateFromEnum :
getDescription : Func<'T, string> *
?sortByDescription : bool *
?filter : Func<'T, bool>
(* Defaults:
let _sortByDescription = defaultArg sortByDescription true
let _filter = defaultArg filter null
*)
-> EnumModel[] when 'T : struct, new()
Parameters
- getDescription
- Type: SystemFuncT, String
- sortByDescription (Optional)
- Type: SystemBoolean
- filter (Optional)
- Type: SystemFuncT, Boolean
Type Parameters
- T
Return Value
Type:
EnumModelSee Also