Пример #1
0
            public object?GetNthMask(int index)
            {
                Portal_FieldIndex enu = (Portal_FieldIndex)index;

                switch (enu)
                {
                case Portal_FieldIndex.Origin:
                    return(Origin);

                case Portal_FieldIndex.Destination:
                    return(Destination);

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Пример #2
0
            public void SetNthMask(int index, object obj)
            {
                Portal_FieldIndex enu = (Portal_FieldIndex)index;

                switch (enu)
                {
                case Portal_FieldIndex.Origin:
                    this.Origin = (Exception?)obj;
                    break;

                case Portal_FieldIndex.Destination:
                    this.Destination = (Exception?)obj;
                    break;

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