Esempio n. 1
0
        protected OneOfBase(OneOf <T0, T1, T2> input)
        {
            _index = input.Index;
            switch (_index)
            {
            case 0: _value0 = input.AsT0; break;

            case 1: _value1 = input.AsT1; break;

            case 2: _value2 = input.AsT2; break;

            default: throw new InvalidOperationException();
            }
        }
Esempio n. 2
0
        protected OneOfBase(OneOf <T0, T1, T2, T3, T4, T5> input)
        {
            _index = input.Index;
            switch (_index)
            {
            case 0: _value0 = input.AsT0; break;

            case 1: _value1 = input.AsT1; break;

            case 2: _value2 = input.AsT2; break;

            case 3: _value3 = input.AsT3; break;

            case 4: _value4 = input.AsT4; break;

            case 5: _value5 = input.AsT5; break;

            default: throw new InvalidOperationException();
            }
        }