public static Task Apply <TUnionType, TUnionDefinition, TOne, TTwo, TThree>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> where TOne : notnull where TTwo : notnull where TThree : notnull => union.Do(one, two, three);
public static async Task <TResult> MatchAsync <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight, TResult>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> > > union, Func <TOne, Task <TResult> > one, Func <TTwo, Task <TResult> > two, Func <TThree, Task <TResult> > three, Func <TFour, Task <TResult> > four, Func <TFive, Task <TResult> > five, Func <TSix, Task <TResult> > six, Func <TSeven, Task <TResult> > seven, Func <TEight, Task <TResult> > eight) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> where TOne : notnull where TTwo : notnull where TThree : notnull where TFour : notnull where TFive : notnull where TSix : notnull where TSeven : notnull where TEight : notnull => await(await union).Match(one, two, three, four, five, six, seven, eight);
public static async Task <TUnionType> DoAsync <TUnionType, TUnionDefinition, TOne, TTwo, TThree>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> > > union, Func <TOne, Task> one, Func <TTwo, Task> two, Func <TThree, Task> three) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> => await(await union).DoAsync(one, two, three);
public static async Task ApplyAsync <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> > > union, Func <TOne, Task> one, Func <TTwo, Task> two, Func <TThree, Task> three, Func <TFour, Task> four, Func <TFive, Task> five) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> => await(await union).ApplyAsync(one, two, three, four, five);
public static Task <Option <TThree> > Three <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour> > > union) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour> => union.Match(_ => Option.None <TThree>(), _ => Option.None <TThree>(), Option.Some, _ => Option.None <TThree>());
public static Task <Option <TTwo> > Two <TUnionType, TUnionDefinition, TOne, TTwo>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> > > union) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> => union.Match(_ => Option.None <TTwo>(), Option.Some);
public static async Task <UnionPartition <TOne, TTwo, TThree, TFour> > Partition <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour>(this IUnionTask <IEnumerable <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour> > > > source) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour> where TOne : notnull where TTwo : notnull where TThree : notnull where TFour : notnull { var values = new ReplayableEnumerable <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour> > >(await source); return(new UnionPartition <TOne, TTwo, TThree, TFour> ( values.WhereOne(), values.WhereTwo(), values.WhereThree(), values.WhereFour() )); }
public static async Task <TResult> MatchAsync <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TResult>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven> > > union, Func <TOne, Task <TResult> > one, Func <TTwo, Task <TResult> > two, Func <TThree, Task <TResult> > three, Func <TFour, Task <TResult> > four, Func <TFive, Task <TResult> > five, Func <TSix, Task <TResult> > six, Func <TSeven, Task <TResult> > seven) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven> => await(await union).Match(one, two, three, four, five, six, seven);
public static Task Apply <TUnionType, TUnionDefinition, TOne>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne> > > union, Action <TOne> one) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne> where TOne : notnull => union.Do(one);
public static async Task <TUnionType> Do <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three, Action <TFour> four, Action <TFive> five) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> where TOne : notnull where TTwo : notnull where TThree : notnull where TFour : notnull where TFive : notnull => (await union).Do(one, two, three, four, five);
public static async Task <TUnionType> Do <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three, Action <TFour> four, Action <TFive> five, Action <TSix> six, Action <TSeven> seven, Action <TEight> eight) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> where TOne : notnull where TTwo : notnull where TThree : notnull where TFour : notnull where TFive : notnull where TSix : notnull where TSeven : notnull where TEight : notnull => (await union).Do(one, two, three, four, five, six, seven, eight);
public static async Task <TUnionType> AsUnion <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> > > union) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> => ((UnionValue <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight>) await union).GetUnion();
public static async Task <TUnionType> AsUnion <TUnionType, TUnionDefinition, TOne, TTwo, TThree>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> > > union) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> => ((UnionValue <TUnionType, TUnionDefinition, TOne, TTwo, TThree>) await union).GetUnion();
public static async Task <TUnionType> AsUnion <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> > > union) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> where TOne : notnull where TTwo : notnull where TThree : notnull where TFour : notnull where TFive : notnull => ((UnionValue <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive>) await union).GetUnion();
public static async Task <TResult> Match <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TResult>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> > > union, Func <TOne, TResult> one, Func <TTwo, TResult> two, Func <TThree, TResult> three, Func <TFour, TResult> four, Func <TFive, TResult> five) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> => (await union).Match(one, two, three, four, five);
public static Task Apply <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three, Action <TFour> four, Action <TFive> five, Action <TSix> six, Action <TSeven> seven) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven> where TOne : notnull where TTwo : notnull where TThree : notnull where TFour : notnull where TFive : notnull where TSix : notnull where TSeven : notnull => union.Do(one, two, three, four, five, six, seven);
public static async Task <TResult> MatchAsync <TUnionType, TUnionDefinition, TOne, TResult>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne> > > union, Func <TOne, Task <TResult> > one) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne> => await(await union).Match(one);
public static async Task <TUnionType> Do <TUnionType, TUnionDefinition, TOne, TTwo>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> > > union, Action <TOne> one, Action <TTwo> two) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> where TOne : notnull where TTwo : notnull => (await union).Do(one, two);
public static async Task <TResult> Match <TUnionType, TUnionDefinition, TOne, TTwo, TResult>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> > > union, Func <TOne, TResult> one, Func <TTwo, TResult> two) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> => (await union).Match(one, two);
public static async Task <TUnionType> Do <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three, Action <TFour> four, Action <TFive> five, Action <TSix> six, Action <TSeven> seven) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven> => (await union).Do(one, two, three, four, five, six, seven);
public static Task <Option <TOne> > One <TUnionType, TUnionDefinition, TOne>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne> > > union) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne> => union.Match(Option.Some);
public static Task Apply <TUnionType, TUnionDefinition, TOne, TTwo>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> > > union, Action <TOne> one, Action <TTwo> two) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> => union.Do(one, two);
public static Task <Option <TEight> > Eight <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> > > union) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> => union.Match(_ => Option.None <TEight>(), _ => Option.None <TEight>(), _ => Option.None <TEight>(), _ => Option.None <TEight>(), _ => Option.None <TEight>(), _ => Option.None <TEight>(), _ => Option.None <TEight>(), Option.Some);
public static Task Apply <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three, Action <TFour> four, Action <TFive> five) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> => union.Do(one, two, three, four, five);
public static async Task ApplyAsync <TUnionType, TUnionDefinition, TOne, TTwo>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> > > union, Func <TOne, Task> one, Func <TTwo, Task> two) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo> => await(await union).ApplyAsync(one, two);
public static Task Apply <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three, Action <TFour> four, Action <TFive> five, Action <TSix> six, Action <TSeven> seven, Action <TEight> eight) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> => union.Do(one, two, three, four, five, six, seven, eight);
public static async Task ApplyAsync <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> > > union, Func <TOne, Task> one, Func <TTwo, Task> two, Func <TThree, Task> three, Func <TFour, Task> four, Func <TFive, Task> five, Func <TSix, Task> six, Func <TSeven, Task> seven, Func <TEight, Task> eight) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix, TSeven, TEight> => await(await union).ApplyAsync(one, two, three, four, five, six, seven, eight);
public static async Task <TUnionType> Do <TUnionType, TUnionDefinition, TOne, TTwo, TThree>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> > > union, Action <TOne> one, Action <TTwo> two, Action <TThree> three) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree> => (await union).Do(one, two, three);
public static async Task <TUnionType> DoAsync <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix> > > union, Func <TOne, Task> one, Func <TTwo, Task> two, Func <TThree, Task> three, Func <TFour, Task> four, Func <TFive, Task> five, Func <TSix, Task> six) where TUnionType : struct where TUnionDefinition : UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TSix> => await(await union).DoAsync(one, two, three, four, five, six);
public static async Task <TResult> MatchAsync <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive, TResult>(this IUnionTask <IUnionValue <UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> > > union, Func <TOne, Task <TResult> > one, Func <TTwo, Task <TResult> > two, Func <TThree, Task <TResult> > three, Func <TFour, Task <TResult> > four, Func <TFive, Task <TResult> > five) where TUnionType : struct where TUnionDefinition : notnull, UnionDefinitionBase <TUnionType, TUnionDefinition, TOne, TTwo, TThree, TFour, TFive> where TOne : notnull where TTwo : notnull where TThree : notnull where TFour : notnull where TFive : notnull => await(await union).Match(one, two, three, four, five);