Exemplo n.º 1
0
            public object?GetNthMask(int index)
            {
                Relation_FieldIndex enu = (Relation_FieldIndex)index;

                switch (enu)
                {
                case Relation_FieldIndex.Faction:
                    return(Faction);

                case Relation_FieldIndex.Modifier:
                    return(Modifier);

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Exemplo n.º 2
0
            public void SetNthMask(int index, object obj)
            {
                Relation_FieldIndex enu = (Relation_FieldIndex)index;

                switch (enu)
                {
                case Relation_FieldIndex.Faction:
                    this.Faction = (Exception?)obj;
                    break;

                case Relation_FieldIndex.Modifier:
                    this.Modifier = (Exception?)obj;
                    break;

                default:
                    throw new ArgumentException($"Index is out of range: {index}");
                }
            }
Exemplo n.º 3
0
            public void SetNthException(int index, Exception ex)
            {
                Relation_FieldIndex enu = (Relation_FieldIndex)index;

                switch (enu)
                {
                case Relation_FieldIndex.Target:
                    this.Target = ex;
                    break;

                case Relation_FieldIndex.Modifier:
                    this.Modifier = ex;
                    break;

                case Relation_FieldIndex.Reaction:
                    this.Reaction = ex;
                    break;

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