public object?GetNthMask(int index) { WeatherType_FieldIndex enu = (WeatherType_FieldIndex)index; switch (enu) { case WeatherType_FieldIndex.Weather: return(Weather); case WeatherType_FieldIndex.Chance: return(Chance); default: throw new ArgumentException($"Index is out of range: {index}"); } }
public void SetNthMask(int index, object obj) { WeatherType_FieldIndex enu = (WeatherType_FieldIndex)index; switch (enu) { case WeatherType_FieldIndex.Weather: this.Weather = (Exception?)obj; break; case WeatherType_FieldIndex.Chance: this.Chance = (Exception?)obj; break; default: throw new ArgumentException($"Index is out of range: {index}"); } }
public void SetNthException(int index, Exception ex) { WeatherType_FieldIndex enu = (WeatherType_FieldIndex)index; switch (enu) { case WeatherType_FieldIndex.Weather: this.Weather = ex; break; case WeatherType_FieldIndex.Chance: this.Chance = ex; break; case WeatherType_FieldIndex.Global: this.Global = ex; break; default: throw new ArgumentException($"Index is out of range: {index}"); } }