Пример #1
0
        public SelectiveTuple(T1 item1, T2 item2, T3 item3, TupleTrioSelection selection)
        {
            switch (selection)
            {
            case TupleTrioSelection.Primary:
                this.Item1 = item1;
                break;

            case TupleTrioSelection.Secondary:
                this.Item2 = item2;
                break;

            case TupleTrioSelection.Tertiary:
                this.Item3 = item3;
                break;

            default:
                throw new ArgumentOutOfRangeException("selection");
            }
        }
Пример #2
0
 public SelectiveTuple(T2 item2)
 {
     this.Item2     = item2;
     this.Selection = TupleTrioSelection.Secondary;
 }
Пример #3
0
 public SelectiveTuple(T3 item3)
 {
     this.Item3     = item3;
     this.Selection = TupleTrioSelection.Tertiary;
 }
Пример #4
0
 public SelectiveTuple(T1 item1)
 {
     this.Item1     = item1;
     this.Selection = TupleTrioSelection.Primary;
 }