public void SetNthMask(int index, object obj) { TeleportDestination_FieldIndex enu = (TeleportDestination_FieldIndex)index; switch (enu) { case TeleportDestination_FieldIndex.Door: this.Door = (Exception?)obj; break; case TeleportDestination_FieldIndex.Position: this.Position = (Exception?)obj; break; case TeleportDestination_FieldIndex.Rotation: this.Rotation = (Exception?)obj; break; case TeleportDestination_FieldIndex.Flags: this.Flags = (Exception?)obj; break; default: throw new ArgumentException($"Index is out of range: {index}"); } }
public object?GetNthMask(int index) { TeleportDestination_FieldIndex enu = (TeleportDestination_FieldIndex)index; switch (enu) { case TeleportDestination_FieldIndex.Destination: return(Destination); case TeleportDestination_FieldIndex.Position: return(Position); case TeleportDestination_FieldIndex.Rotation: return(Rotation); default: throw new ArgumentException($"Index is out of range: {index}"); } }
public void SetNthException(int index, Exception ex) { TeleportDestination_FieldIndex enu = (TeleportDestination_FieldIndex)index; switch (enu) { case TeleportDestination_FieldIndex.Destination: this.Destination = ex; break; case TeleportDestination_FieldIndex.Position: this.Position = ex; break; case TeleportDestination_FieldIndex.Rotation: this.Rotation = ex; break; default: throw new ArgumentException($"Index is out of range: {index}"); } }