DiscriminatedUnionListExtensions.

Match<Type1, Type2, BaseType>(List<DiscriminatedUnionWithBase<Type1, Type2, BaseType>>, Action<Type1>, Action<Type2>) Method

Summary

Runs actions for the specific matching types.

Syntax

public static void Match<Type1, Type2, BaseType>(this List<DiscriminatedUnionWithBase<Type1, Type2, BaseType>> values, Action<Type1> Action1, Action<Type2> Action2) 
    where Type1 : BaseType where Type2 : BaseType

Type Parameters

Name Description
Type1 Type1
Type2 Type2
BaseType

Parameters

Name Type Description
values List<DiscriminatedUnionWithBase<Type1, Type2, BaseType>>
Action1 Action<Type1> The action to run for Type1
Action2 Action<Type2> The action to run for Type2

Return Value

Type Description
void