コード例 #1
0
        protected UnionOf(UnionType <T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> input)
        {
            _ix = input.Index;
            switch (_ix)
            {
            case 0:
                _v0 = input.AsT0();
                break;

            case 1:
                _v1 = input.AsT1();
                break;

            case 2:
                _v2 = input.AsT2();
                break;

            case 3:
                _v3 = input.AsT3();
                break;

            case 4:
                _v4 = input.AsT4();
                break;

            case 5:
                _v5 = input.AsT5();
                break;

            case 6:
                _v6 = input.AsT6();
                break;

            case 7:
                _v7 = input.AsT7();
                break;

            case 8:
                _v8 = input.AsT8();
                break;

            case 9:
                _v9 = input.AsT9();
                break;

            case 10:
                _v10 = input.AsT10();
                break;

            case 11:
                _v11 = input.AsT11();
                break;

            case 12:
                _v12 = input.AsT12();
                break;

            case 13:
                _v13 = input.AsT13();
                break;

            case 14:
                _v14 = input.AsT14();
                break;

            default:
                throw new InvalidOperationException("Unexpected index, which indicates a problem in the UnionOf codegen.");
            }
        }