Exemple #1
0
    public static async Task <T> Match <T>(this IsmParameter parameter, Func <smParameters.atob, Task <T> > atob)
    {
        switch (parameter.Trigger.UnionCase)
        {
        case smTrigger.UnionCases.atob:
            return(await atob((smParameters.atob) parameter).ConfigureAwait(false));

        default:
            throw new ArgumentException($"Unknown type derived from IsmParameter: {parameter.GetType().Name}");
        }
    }
Exemple #2
0
    public static T Match <T>(this IsmParameter parameter, Func <smParameters.atob, T> atob)
    {
        switch (parameter.Trigger.UnionCase)
        {
        case smTrigger.UnionCases.atob:
            return(atob((smParameters.atob)parameter));

        default:
            throw new ArgumentException($"Unknown type derived from IsmParameter: {parameter.GetType().Name}");
        }
    }