|
| 1 | +using System.Collections.Generic; |
| 2 | + |
| 3 | +namespace Platform.Setters |
| 4 | +{ |
| 5 | + public static class SetterExtensions |
| 6 | + { |
| 7 | + public static TDecision SetFirstFromFirstListAndReturnTrue<TResult, TDecision>(this Setter<TResult, TDecision> setter, IList<TResult> list1, IList<TResult> list2) |
| 8 | + { |
| 9 | + setter.Set(list1[0]); |
| 10 | + return setter.TrueValue; |
| 11 | + } |
| 12 | + |
| 13 | + public static TDecision SetSecondFromFirstListAndReturnTrue<TResult, TDecision>(this Setter<TResult, TDecision> setter, IList<TResult> list1, IList<TResult> list2) |
| 14 | + { |
| 15 | + setter.Set(list1[1]); |
| 16 | + return setter.TrueValue; |
| 17 | + } |
| 18 | + |
| 19 | + public static TDecision SetThirdFromFirstListAndReturnTrue<TResult, TDecision>(this Setter<TResult, TDecision> setter, IList<TResult> list1, IList<TResult> list2) |
| 20 | + { |
| 21 | + setter.Set(list1[2]); |
| 22 | + return setter.TrueValue; |
| 23 | + } |
| 24 | + |
| 25 | + public static TDecision SetFirstFromSecondListAndReturnTrue<TResult, TDecision>(this Setter<TResult, TDecision> setter, IList<TResult> list1, IList<TResult> list2) |
| 26 | + { |
| 27 | + setter.Set(list2[0]); |
| 28 | + return setter.TrueValue; |
| 29 | + } |
| 30 | + |
| 31 | + public static TDecision SetSecondFromSecondListAndReturnTrue<TResult, TDecision>(this Setter<TResult, TDecision> setter, IList<TResult> list1, IList<TResult> list2) |
| 32 | + { |
| 33 | + setter.Set(list2[1]); |
| 34 | + return setter.TrueValue; |
| 35 | + } |
| 36 | + |
| 37 | + public static TDecision SetThirdFromSecondListAndReturnTrue<TResult, TDecision>(this Setter<TResult, TDecision> setter, IList<TResult> list1, IList<TResult> list2) |
| 38 | + { |
| 39 | + setter.Set(list2[2]); |
| 40 | + return setter.TrueValue; |
| 41 | + } |
| 42 | + } |
| 43 | +} |
| 44 | + |
0 commit comments