Extensions.Map Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Map<E,T>(E, ValueTuple<E,Func<T>>[]) | |
| Map<E>(E, ValueTuple<E,Action>[]) |
Given a value of an enumeration type, and an action for each possible value of that enumeration type, performs the action corresponding to the given value. |
Map<E,T>(E, ValueTuple<E,Func<T>>[])
public static T Map<E,T> (this E enum, params (E, Func<T>)[] actions) where E : struct;
static member Map : 'E * ValueTuple<'E, Func<'T> (requires 'E : struct)>[] -> 'T (requires 'E : struct)
<Extension()>
Public Function Map(Of E As Structure, T As Structure) (enum As E, ParamArray actions As ValueTuple(Of E, Func(Of T))()) As T
Type Parameters
- E
- T
Parameters
- enum
- E
- actions
- ValueTuple<E,Func<T>>[]
Returns
- T
Applies to
Map<E>(E, ValueTuple<E,Action>[])
Given a value of an enumeration type, and an action for each possible value of that enumeration type, performs the action corresponding to the given value.
public static void Map<E> (this E enum, params (E, Action)[] actions) where E : struct;
static member Map : 'E * ValueTuple<'E, Action (requires 'E : struct)>[] -> unit (requires 'E : struct)
<Extension()>
Public Sub Map(Of E As Structure) (enum As E, ParamArray actions As ValueTuple(Of E, Action)())
Type Parameters
- E
Parameters
- enum
- E
- actions
- ValueTuple<E,Action>[]