DiscriminatedUnionIEnumerableExtensions.

Match<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>(IEnumerable<DiscriminatedUnion<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>>, Action<Type1>, Action<Type2>, Action<Type3>, Action<Type4>, Action<Type5>, Action<Type6>, Action<Type7>, Action<Type8>) Method

Summary

Matches the specific types and executes the given action for them.

Syntax

public static void Match<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>(this IEnumerable<DiscriminatedUnion<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>> values, Action<Type1> Action1, Action<Type2> Action2, Action<Type3> Action3, Action<Type4> Action4, Action<Type5> Action5, Action<Type6> Action6, Action<Type7> Action7, Action<Type8> Action8)

Type Parameters

Name Description
Type1 Type1
Type2 Type2
Type3 Type3
Type4 Type4
Type5 Type5
Type6 Type6
Type7 Type7
Type8 Type8

Parameters

Name Type Description
values IEnumerable<DiscriminatedUnion<Type1, Type2, Type3, Type4, Type5, Type6, Type7, Type8>> existing Discriminated unions
Action1 Action<Type1> Action to run for Type1
Action2 Action<Type2> Action to run for Type2
Action3 Action<Type3> Action to run for Type3
Action4 Action<Type4> Action to run for Type4
Action5 Action<Type5> Action to run for Type5
Action6 Action<Type6> Action to run for Type6
Action7 Action<Type7> Action to run for Type7
Action8 Action<Type8> Action to run for Type8

Return Value

Type Description
void