Example #1
0
            public object?GetNthMask(int index)
            {
                PexObjectNamedFunction_FieldIndex enu = (PexObjectNamedFunction_FieldIndex)index;

                switch (enu)
                {
                case PexObjectNamedFunction_FieldIndex.FunctionName:
                    return(FunctionName);

                case PexObjectNamedFunction_FieldIndex.Function:
                    return(Function);

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Example #2
0
            public void SetNthMask(int index, object obj)
            {
                PexObjectNamedFunction_FieldIndex enu = (PexObjectNamedFunction_FieldIndex)index;

                switch (enu)
                {
                case PexObjectNamedFunction_FieldIndex.FunctionName:
                    this.FunctionName = (Exception?)obj;
                    break;

                case PexObjectNamedFunction_FieldIndex.Function:
                    this.Function = (MaskItem <Exception?, PexObjectFunction.ErrorMask?>?)obj;
                    break;

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Example #3
0
            public void SetNthException(int index, Exception ex)
            {
                PexObjectNamedFunction_FieldIndex enu = (PexObjectNamedFunction_FieldIndex)index;

                switch (enu)
                {
                case PexObjectNamedFunction_FieldIndex.FunctionName:
                    this.FunctionName = ex;
                    break;

                case PexObjectNamedFunction_FieldIndex.Function:
                    this.Function = new MaskItem <Exception?, PexObjectFunction.ErrorMask?>(ex, null);
                    break;

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }