src/fursvp.domain/Validation/ValidateTimeZone.cs
/// <summary>
/// Throws an exception if a TimeZoneId string cannot be resolved to an instance of TimeZoneInfo.
/// </summary>
/// <param name="id">The TimeZoneId.</param>
Throws an exception if a TimeZoneId string cannot be resolved to an instance of TimeZoneInfo.
Throws an exception if a TimeZoneId string cannot be resolved to an instance of TimeZoneInfo .
public void Validate(string id)
        {
            try
            {
                TimeZoneInfo.FindSystemTimeZoneById(id);
            }
            catch (ArgumentNullException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw new ValidationException<string>(ex.Message, ex);
            }
        }
public void Validate ( string id ) { try { TimeZoneInfo . FindSystemTimeZoneById ( id ) ; } catch ( ArgumentNullException ) { throw ; } catch ( Exception ex ) { throw new ValidationException < string > ( ex . Message , ex ) ; } }
Throws an exception if a TimeZoneId string cannot be resolved to an instance of TimeZoneInfo.
Throws an exception if a TimeZoneId string cannot be resolved to an instance of TimeZoneInfo .
id
string
None