DiscriminatedUnionIEnumerableExtensions.

Match<TUnion, Type1, Type2, Type3>(IEnumerable<TUnion>, Action<Type1>, Action<Type2>, Action<Type3>) Method

Summary

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

Syntax

public static void Match<TUnion, Type1, Type2, Type3>(this IEnumerable<TUnion> values, Action<Type1> Action1, Action<Type2> Action2, Action<Type3> Action3) 
    where TUnion : DiscriminatedUnion<Type1, Type2, Type3>

Type Parameters

Name Description
TUnion TUnion
Type1 Type1
Type2 Type2
Type3 Type3

Parameters

Name Type Description
values IEnumerable<TUnion> 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

Return Value

Type Description
void