public static void Match <T1, T2, T3, T4>(this FSharpChoice <T1, T2, T3, T4> choice, Action <T1> action1, Action <T2> action2, Action <T3> action3, Action <T4> action4) { choice.Match(x => { action1(x); return(0); }, x => { action2(x); return(0); }, x => { action3(x); return(0); }, x => { action4(x); return(0); }); }
public static Option <T3> GetChoice3Of3 <T1, T2, T3>(this FSharpChoice <T1, T2, T3> choice) { return(choice.Match(x => Option.None, x => Option.None, Option.GetSome)); }
public static Option <T1> GetChoice1Of2 <T1, T2>(this FSharpChoice <T1, T2> choice) { return(choice.Match(Option.GetSome, x => Option.None)); }
public static Option <T2> GetChoice2Of2 <T1, T2>(this FSharpChoice <T1, T2> choice) { return(choice.Match(x => Option.None, Option.GetSome)); }
public static void Match <T1, T2>(this FSharpChoice <T1, T2> choice, Action <T1> action1, Action <T2> action2) { choice.Match(x => { action1(x); return(0); }, x => { action2(x); return(0); }); }