public object?GetNthMask(int index) { PexObjectState_FieldIndex enu = (PexObjectState_FieldIndex)index; switch (enu) { case PexObjectState_FieldIndex.Name: return(Name); case PexObjectState_FieldIndex.Functions: return(Functions); default: throw new ArgumentException($"Index is out of range: {index}"); } }
public void SetNthMask(int index, object obj) { PexObjectState_FieldIndex enu = (PexObjectState_FieldIndex)index; switch (enu) { case PexObjectState_FieldIndex.Name: this.Name = (Exception?)obj; break; case PexObjectState_FieldIndex.Functions: this.Functions = (MaskItem <Exception?, IEnumerable <MaskItem <Exception?, PexObjectNamedFunction.ErrorMask?> >?>)obj; break; default: throw new ArgumentException($"Index is out of range: {index}"); } }