Class VariantExtensions
Extensions for Variant.
Inheritance
System.Object
VariantExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Maki
Assembly: Maki.dll
Syntax
public static class VariantExtensions
Methods
|
Improve this Doc
View Source
Apply<T1, T2>(Variant<T1, T2>, Action<T1>, Action<T2>)
Applies the action matching the item inhabiting the variant.
Declaration
public static void Apply<T1, T2>(this Variant<T1, T2> variant, Action<T1> act1, Action<T2> act2)
Parameters
Type |
Name |
Description |
Variant<T1, T2> |
variant |
This variant. |
System.Action<T1> |
act1 |
The first action. |
System.Action<T2> |
act2 |
The second action. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
|
Improve this Doc
View Source
Apply<T1, T2, T3>(Variant<T1, T2, T3>, Action<T1>, Action<T2>, Action<T3>)
Applies the action matching the item inhabiting the variant.
Declaration
public static void Apply<T1, T2, T3>(this Variant<T1, T2, T3> variant, Action<T1> act1, Action<T2> act2, Action<T3> act3)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3> |
variant |
This variant. |
System.Action<T1> |
act1 |
The first action. |
System.Action<T2> |
act2 |
The second action. |
System.Action<T3> |
act3 |
The third action. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
|
Improve this Doc
View Source
Apply<T1, T2, U>(Variant<T1, T2>, Func<T1, U>, Func<T2, U>)
Applies the function matching the item inhabiting the variant. Returns the result of the function.
Declaration
public static U Apply<T1, T2, U>(this Variant<T1, T2> variant, Func<T1, U> func1, Func<T2, U> func2)
Parameters
Type |
Name |
Description |
Variant<T1, T2> |
variant |
This variant. |
System.Func<T1, U> |
func1 |
The first function. |
System.Func<T2, U> |
func2 |
The second function. |
Returns
Type |
Description |
U |
Result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
U |
The return type of the functions. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4>(Variant<T1, T2, T3, T4>, Action<T1>, Action<T2>, Action<T3>, Action<T4>)
Applies the action matching the item inhabiting the variant.
Declaration
public static void Apply<T1, T2, T3, T4>(this Variant<T1, T2, T3, T4> variant, Action<T1> act1, Action<T2> act2, Action<T3> act3, Action<T4> act4)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4> |
variant |
This variant. |
System.Action<T1> |
act1 |
The first action. |
System.Action<T2> |
act2 |
The second action. |
System.Action<T3> |
act3 |
The third action. |
System.Action<T4> |
act4 |
The fourth action. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, U>(Variant<T1, T2, T3>, Func<T1, U>, Func<T2, U>, Func<T3, U>)
Applies the function matching the item inhabiting the variant. Returns the result of the function.
Declaration
public static U Apply<T1, T2, T3, U>(this Variant<T1, T2, T3> variant, Func<T1, U> func1, Func<T2, U> func2, Func<T3, U> func3)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3> |
variant |
This variant. |
System.Func<T1, U> |
func1 |
The first function. |
System.Func<T2, U> |
func2 |
The second function. |
System.Func<T3, U> |
func3 |
The third function. |
Returns
Type |
Description |
U |
Result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
U |
The return type of the functions. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5>(Variant<T1, T2, T3, T4, T5>, Action<T1>, Action<T2>, Action<T3>, Action<T4>, Action<T5>)
Applies the action matching the item inhabiting the variant.
Declaration
public static void Apply<T1, T2, T3, T4, T5>(this Variant<T1, T2, T3, T4, T5> variant, Action<T1> act1, Action<T2> act2, Action<T3> act3, Action<T4> act4, Action<T5> act5)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5> |
variant |
This variant. |
System.Action<T1> |
act1 |
The first action. |
System.Action<T2> |
act2 |
The second action. |
System.Action<T3> |
act3 |
The third action. |
System.Action<T4> |
act4 |
The fourth action. |
System.Action<T5> |
act5 |
The fifth action. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, U>(Variant<T1, T2, T3, T4>, Func<T1, U>, Func<T2, U>, Func<T3, U>, Func<T4, U>)
Applies the function matching the item inhabiting the variant. Returns the result of the function.
Declaration
public static U Apply<T1, T2, T3, T4, U>(this Variant<T1, T2, T3, T4> variant, Func<T1, U> func1, Func<T2, U> func2, Func<T3, U> func3, Func<T4, U> func4)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4> |
variant |
This variant. |
System.Func<T1, U> |
func1 |
The first function. |
System.Func<T2, U> |
func2 |
The second function. |
System.Func<T3, U> |
func3 |
The third function. |
System.Func<T4, U> |
func4 |
The fourth function. |
Returns
Type |
Description |
U |
Result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
U |
The return type of the functions. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5, T6>(Variant<T1, T2, T3, T4, T5, T6>, Action<T1>, Action<T2>, Action<T3>, Action<T4>, Action<T5>, Action<T6>)
Applies the action matching the item inhabiting the variant.
Declaration
public static void Apply<T1, T2, T3, T4, T5, T6>(this Variant<T1, T2, T3, T4, T5, T6> variant, Action<T1> act1, Action<T2> act2, Action<T3> act3, Action<T4> act4, Action<T5> act5, Action<T6> act6)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6> |
variant |
This variant. |
System.Action<T1> |
act1 |
The first action. |
System.Action<T2> |
act2 |
The second action. |
System.Action<T3> |
act3 |
The third action. |
System.Action<T4> |
act4 |
The fourth action. |
System.Action<T5> |
act5 |
The fifth action. |
System.Action<T6> |
act6 |
The sixth action. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5, U>(Variant<T1, T2, T3, T4, T5>, Func<T1, U>, Func<T2, U>, Func<T3, U>, Func<T4, U>, Func<T5, U>)
Applies the function matching the item inhabiting the variant. Returns the result of the function.
Declaration
public static U Apply<T1, T2, T3, T4, T5, U>(this Variant<T1, T2, T3, T4, T5> variant, Func<T1, U> func1, Func<T2, U> func2, Func<T3, U> func3, Func<T4, U> func4, Func<T5, U> func5)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5> |
variant |
This variant. |
System.Func<T1, U> |
func1 |
The first function. |
System.Func<T2, U> |
func2 |
The second function. |
System.Func<T3, U> |
func3 |
The third function. |
System.Func<T4, U> |
func4 |
The fourth function. |
System.Func<T5, U> |
func5 |
The fifth function. |
Returns
Type |
Description |
U |
Result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
U |
The return type of the functions. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5, T6, T7>(Variant<T1, T2, T3, T4, T5, T6, T7>, Action<T1>, Action<T2>, Action<T3>, Action<T4>, Action<T5>, Action<T6>, Action<T7>)
Applies the action matching the item inhabiting the variant.
Declaration
public static void Apply<T1, T2, T3, T4, T5, T6, T7>(this Variant<T1, T2, T3, T4, T5, T6, T7> variant, Action<T1> act1, Action<T2> act2, Action<T3> act3, Action<T4> act4, Action<T5> act5, Action<T6> act6, Action<T7> act7)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6, T7> |
variant |
This variant. |
System.Action<T1> |
act1 |
The first action. |
System.Action<T2> |
act2 |
The second action. |
System.Action<T3> |
act3 |
The third action. |
System.Action<T4> |
act4 |
The fourth action. |
System.Action<T5> |
act5 |
The fifth action. |
System.Action<T6> |
act6 |
The sixth action. |
System.Action<T7> |
act7 |
The seventh action. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
T7 |
The seventh type of the variant. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5, T6, U>(Variant<T1, T2, T3, T4, T5, T6>, Func<T1, U>, Func<T2, U>, Func<T3, U>, Func<T4, U>, Func<T5, U>, Func<T6, U>)
Applies the function matching the item inhabiting the variant. Returns the result of the function.
Declaration
public static U Apply<T1, T2, T3, T4, T5, T6, U>(this Variant<T1, T2, T3, T4, T5, T6> variant, Func<T1, U> func1, Func<T2, U> func2, Func<T3, U> func3, Func<T4, U> func4, Func<T5, U> func5, Func<T6, U> func6)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6> |
variant |
This variant. |
System.Func<T1, U> |
func1 |
The first function. |
System.Func<T2, U> |
func2 |
The second function. |
System.Func<T3, U> |
func3 |
The third function. |
System.Func<T4, U> |
func4 |
The fourth function. |
System.Func<T5, U> |
func5 |
The fifth function. |
System.Func<T6, U> |
func6 |
The sixth function. |
Returns
Type |
Description |
U |
Result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
U |
The return type of the functions. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5, T6, T7, T8>(Variant<T1, T2, T3, T4, T5, T6, T7, T8>, Action<T1>, Action<T2>, Action<T3>, Action<T4>, Action<T5>, Action<T6>, Action<T7>, Action<T8>)
Applies the action matching the item inhabiting the variant.
Declaration
public static void Apply<T1, T2, T3, T4, T5, T6, T7, T8>(this Variant<T1, T2, T3, T4, T5, T6, T7, T8> variant, Action<T1> act1, Action<T2> act2, Action<T3> act3, Action<T4> act4, Action<T5> act5, Action<T6> act6, Action<T7> act7, Action<T8> act8)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6, T7, T8> |
variant |
This variant. |
System.Action<T1> |
act1 |
The first action. |
System.Action<T2> |
act2 |
The second action. |
System.Action<T3> |
act3 |
The third action. |
System.Action<T4> |
act4 |
The fourth action. |
System.Action<T5> |
act5 |
The fifth action. |
System.Action<T6> |
act6 |
The sixth action. |
System.Action<T7> |
act7 |
The seventh action. |
System.Action<T8> |
act8 |
The eighth action. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
T7 |
The seventh type of the variant. |
T8 |
The eighth type of the variant. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5, T6, T7, U>(Variant<T1, T2, T3, T4, T5, T6, T7>, Func<T1, U>, Func<T2, U>, Func<T3, U>, Func<T4, U>, Func<T5, U>, Func<T6, U>, Func<T7, U>)
Applies the function matching the item inhabiting the variant. Returns the result of the function.
Declaration
public static U Apply<T1, T2, T3, T4, T5, T6, T7, U>(this Variant<T1, T2, T3, T4, T5, T6, T7> variant, Func<T1, U> func1, Func<T2, U> func2, Func<T3, U> func3, Func<T4, U> func4, Func<T5, U> func5, Func<T6, U> func6, Func<T7, U> func7)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6, T7> |
variant |
This variant. |
System.Func<T1, U> |
func1 |
The first function. |
System.Func<T2, U> |
func2 |
The second function. |
System.Func<T3, U> |
func3 |
The third function. |
System.Func<T4, U> |
func4 |
The fourth function. |
System.Func<T5, U> |
func5 |
The fifth function. |
System.Func<T6, U> |
func6 |
The sixth function. |
System.Func<T7, U> |
func7 |
The seventh function. |
Returns
Type |
Description |
U |
Result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
T7 |
The seventh type of the variant. |
U |
The return type of the functions. |
|
Improve this Doc
View Source
Apply<T1, T2, T3, T4, T5, T6, T7, T8, U>(Variant<T1, T2, T3, T4, T5, T6, T7, T8>, Func<T1, U>, Func<T2, U>, Func<T3, U>, Func<T4, U>, Func<T5, U>, Func<T6, U>, Func<T7, U>, Func<T8, U>)
Applies the function matching the item inhabiting the variant. Returns the result of the function.
Declaration
public static U Apply<T1, T2, T3, T4, T5, T6, T7, T8, U>(this Variant<T1, T2, T3, T4, T5, T6, T7, T8> variant, Func<T1, U> func1, Func<T2, U> func2, Func<T3, U> func3, Func<T4, U> func4, Func<T5, U> func5, Func<T6, U> func6, Func<T7, U> func7, Func<T8, U> func8)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6, T7, T8> |
variant |
This variant. |
System.Func<T1, U> |
func1 |
The first function. |
System.Func<T2, U> |
func2 |
The second function. |
System.Func<T3, U> |
func3 |
The third function. |
System.Func<T4, U> |
func4 |
The fourth function. |
System.Func<T5, U> |
func5 |
The fifth function. |
System.Func<T6, U> |
func6 |
The sixth function. |
System.Func<T7, U> |
func7 |
The seventh function. |
System.Func<T8, U> |
func8 |
The eighth function. |
Returns
Type |
Description |
U |
Result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
T7 |
The seventh type of the variant. |
T8 |
The eighth type of the variant. |
U |
The return type of the functions. |
|
Improve this Doc
View Source
Map<T1, T2, T3, T4, T5, U1, U2, U3, U4, U5>(Variant<T1, T2, T3, T4, T5>, Func<T1, U1>, Func<T2, U2>, Func<T3, U3>, Func<T4, U4>, Func<T5, U5>)
Maps the function matching the item inhabiting the variant. Returns a new variant containing the
result of the function.
Declaration
public static Variant<U1, U2, U3, U4, U5> Map<T1, T2, T3, T4, T5, U1, U2, U3, U4, U5>(this Variant<T1, T2, T3, T4, T5> variant, Func<T1, U1> func1, Func<T2, U2> func2, Func<T3, U3> func3, Func<T4, U4> func4, Func<T5, U5> func5)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5> |
variant |
This variant. |
System.Func<T1, U1> |
func1 |
The first function. |
System.Func<T2, U2> |
func2 |
The second function. |
System.Func<T3, U3> |
func3 |
The third function. |
System.Func<T4, U4> |
func4 |
The fourth function. |
System.Func<T5, U5> |
func5 |
The fifth function. |
Returns
Type |
Description |
Variant<U1, U2, U3, U4, U5> |
New variant containing the result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
U1 |
The first type of the returned variant. |
U2 |
The second type of the returned variant. |
U3 |
The third type of the returned variant. |
U4 |
The fourth type of the returned variant. |
U5 |
The fifth type of the returned variant. |
|
Improve this Doc
View Source
Map<T1, T2, T3, T4, T5, T6, U1, U2, U3, U4, U5, U6>(Variant<T1, T2, T3, T4, T5, T6>, Func<T1, U1>, Func<T2, U2>, Func<T3, U3>, Func<T4, U4>, Func<T5, U5>, Func<T6, U6>)
Maps the function matching the item inhabiting the variant. Returns a new variant containing the
result of the function.
Declaration
public static Variant<U1, U2, U3, U4, U5, U6> Map<T1, T2, T3, T4, T5, T6, U1, U2, U3, U4, U5, U6>(this Variant<T1, T2, T3, T4, T5, T6> variant, Func<T1, U1> func1, Func<T2, U2> func2, Func<T3, U3> func3, Func<T4, U4> func4, Func<T5, U5> func5, Func<T6, U6> func6)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6> |
variant |
This variant. |
System.Func<T1, U1> |
func1 |
The first function. |
System.Func<T2, U2> |
func2 |
The second function. |
System.Func<T3, U3> |
func3 |
The third function. |
System.Func<T4, U4> |
func4 |
The fourth function. |
System.Func<T5, U5> |
func5 |
The fifth function. |
System.Func<T6, U6> |
func6 |
The sixth function. |
Returns
Type |
Description |
Variant<U1, U2, U3, U4, U5, U6> |
New variant containing the result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
U1 |
The first type of the returned variant. |
U2 |
The second type of the returned variant. |
U3 |
The third type of the returned variant. |
U4 |
The fourth type of the returned variant. |
U5 |
The fifth type of the returned variant. |
U6 |
The sixth type of the returned variant. |
|
Improve this Doc
View Source
Map<T1, T2, T3, T4, T5, T6, T7, U1, U2, U3, U4, U5, U6, U7>(Variant<T1, T2, T3, T4, T5, T6, T7>, Func<T1, U1>, Func<T2, U2>, Func<T3, U3>, Func<T4, U4>, Func<T5, U5>, Func<T6, U6>, Func<T7, U7>)
Maps the function matching the item inhabiting the variant. Returns a new variant containing the
result of the function.
Declaration
public static Variant<U1, U2, U3, U4, U5, U6, U7> Map<T1, T2, T3, T4, T5, T6, T7, U1, U2, U3, U4, U5, U6, U7>(this Variant<T1, T2, T3, T4, T5, T6, T7> variant, Func<T1, U1> func1, Func<T2, U2> func2, Func<T3, U3> func3, Func<T4, U4> func4, Func<T5, U5> func5, Func<T6, U6> func6, Func<T7, U7> func7)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6, T7> |
variant |
This variant. |
System.Func<T1, U1> |
func1 |
The first function. |
System.Func<T2, U2> |
func2 |
The second function. |
System.Func<T3, U3> |
func3 |
The third function. |
System.Func<T4, U4> |
func4 |
The fourth function. |
System.Func<T5, U5> |
func5 |
The fifth function. |
System.Func<T6, U6> |
func6 |
The sixth function. |
System.Func<T7, U7> |
func7 |
The seventh function. |
Returns
Type |
Description |
Variant<U1, U2, U3, U4, U5, U6, U7> |
New variant containing the result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
T7 |
The seventh type of the variant. |
U1 |
The first type of the returned variant. |
U2 |
The second type of the returned variant. |
U3 |
The third type of the returned variant. |
U4 |
The fourth type of the returned variant. |
U5 |
The fifth type of the returned variant. |
U6 |
The sixth type of the returned variant. |
U7 |
The seventh type of the returned variant. |
|
Improve this Doc
View Source
Map<T1, T2, T3, T4, T5, T6, T7, T8, U1, U2, U3, U4, U5, U6, U7, U8>(Variant<T1, T2, T3, T4, T5, T6, T7, T8>, Func<T1, U1>, Func<T2, U2>, Func<T3, U3>, Func<T4, U4>, Func<T5, U5>, Func<T6, U6>, Func<T7, U7>, Func<T8, U8>)
Maps the function matching the item inhabiting the variant. Returns a new variant containing the
result of the function.
Declaration
public static Variant<U1, U2, U3, U4, U5, U6, U7, U8> Map<T1, T2, T3, T4, T5, T6, T7, T8, U1, U2, U3, U4, U5, U6, U7, U8>(this Variant<T1, T2, T3, T4, T5, T6, T7, T8> variant, Func<T1, U1> func1, Func<T2, U2> func2, Func<T3, U3> func3, Func<T4, U4> func4, Func<T5, U5> func5, Func<T6, U6> func6, Func<T7, U7> func7, Func<T8, U8> func8)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4, T5, T6, T7, T8> |
variant |
This variant. |
System.Func<T1, U1> |
func1 |
The first function. |
System.Func<T2, U2> |
func2 |
The second function. |
System.Func<T3, U3> |
func3 |
The third function. |
System.Func<T4, U4> |
func4 |
The fourth function. |
System.Func<T5, U5> |
func5 |
The fifth function. |
System.Func<T6, U6> |
func6 |
The sixth function. |
System.Func<T7, U7> |
func7 |
The seventh function. |
System.Func<T8, U8> |
func8 |
The eighth function. |
Returns
Type |
Description |
Variant<U1, U2, U3, U4, U5, U6, U7, U8> |
New variant containing the result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
T5 |
The fifth type of the variant. |
T6 |
The sixth type of the variant. |
T7 |
The seventh type of the variant. |
T8 |
The eighth type of the variant. |
U1 |
The first type of the returned variant. |
U2 |
The second type of the returned variant. |
U3 |
The third type of the returned variant. |
U4 |
The fourth type of the returned variant. |
U5 |
The fifth type of the returned variant. |
U6 |
The sixth type of the returned variant. |
U7 |
The seventh type of the returned variant. |
U8 |
The eighth type of the returned variant. |
|
Improve this Doc
View Source
Map<T1, T2, U1, U2>(Variant<T1, T2>, Func<T1, U1>, Func<T2, U2>)
Maps the function matching the item inhabiting the variant. Returns a new variant containing the
result of the function.
Declaration
public static Variant<U1, U2> Map<T1, T2, U1, U2>(this Variant<T1, T2> variant, Func<T1, U1> func1, Func<T2, U2> func2)
Parameters
Type |
Name |
Description |
Variant<T1, T2> |
variant |
This variant. |
System.Func<T1, U1> |
func1 |
The first function. |
System.Func<T2, U2> |
func2 |
The second function. |
Returns
Type |
Description |
Variant<U1, U2> |
New variant containing the result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
U1 |
The first type of the returned variant. |
U2 |
The second type of the returned variant. |
|
Improve this Doc
View Source
Map<T1, T2, T3, U1, U2, U3>(Variant<T1, T2, T3>, Func<T1, U1>, Func<T2, U2>, Func<T3, U3>)
Maps the function matching the item inhabiting the variant. Returns a new variant containing the
result of the function.
Declaration
public static Variant<U1, U2, U3> Map<T1, T2, T3, U1, U2, U3>(this Variant<T1, T2, T3> variant, Func<T1, U1> func1, Func<T2, U2> func2, Func<T3, U3> func3)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3> |
variant |
This variant. |
System.Func<T1, U1> |
func1 |
The first function. |
System.Func<T2, U2> |
func2 |
The second function. |
System.Func<T3, U3> |
func3 |
The third function. |
Returns
Type |
Description |
Variant<U1, U2, U3> |
New variant containing the result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
U1 |
The first type of the returned variant. |
U2 |
The second type of the returned variant. |
U3 |
The third type of the returned variant. |
|
Improve this Doc
View Source
Map<T1, T2, T3, T4, U1, U2, U3, U4>(Variant<T1, T2, T3, T4>, Func<T1, U1>, Func<T2, U2>, Func<T3, U3>, Func<T4, U4>)
Maps the function matching the item inhabiting the variant. Returns a new variant containing the
result of the function.
Declaration
public static Variant<U1, U2, U3, U4> Map<T1, T2, T3, T4, U1, U2, U3, U4>(this Variant<T1, T2, T3, T4> variant, Func<T1, U1> func1, Func<T2, U2> func2, Func<T3, U3> func3, Func<T4, U4> func4)
Parameters
Type |
Name |
Description |
Variant<T1, T2, T3, T4> |
variant |
This variant. |
System.Func<T1, U1> |
func1 |
The first function. |
System.Func<T2, U2> |
func2 |
The second function. |
System.Func<T3, U3> |
func3 |
The third function. |
System.Func<T4, U4> |
func4 |
The fourth function. |
Returns
Type |
Description |
Variant<U1, U2, U3, U4> |
New variant containing the result of the applied function. |
Type Parameters
Name |
Description |
T1 |
The first type of the variant. |
T2 |
The second type of the variant. |
T3 |
The third type of the variant. |
T4 |
The fourth type of the variant. |
U1 |
The first type of the returned variant. |
U2 |
The second type of the returned variant. |
U3 |
The third type of the returned variant. |
U4 |
The fourth type of the returned variant. |