DiscriminatedUnionIEnumerableExtensions.

Match<Type1, Type2>(IEnumerable<DiscriminatedUnion<Type1, Type2>>, Action<Type1>, Action<Type2>) Method

Summary

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

Syntax

public static void Match<Type1, Type2>(this IEnumerable<DiscriminatedUnion<Type1, Type2>> values, Action<Type1> Action1, Action<Type2> Action2)

Type Parameters

Name Description
Type1 Type1
Type2 Type2

Parameters

Name Type Description
values IEnumerable<DiscriminatedUnion<Type1, Type2>> existing Discriminated unions
Action1 Action<Type1> Action to run for Type1
Action2 Action<Type2> Action to run for Type2

Return Value

Type Description
void