private PSValidationKind Convert(ValidationKind value) { switch (value) { case ValidationKind.SystemValidation: return(PSValidationKind.SystemValidation); case ValidationKind.NamespaceValidation: return(PSValidationKind.NamespaceValidation); default: throw new ArgumentException($"{value.GetType().Name} value {value} is unsupported"); } }
/// <summary> /// Converts the specified value. /// </summary> /// <param name="value">The value.</param> /// <returns>PSValidationKind.</returns> /// <exception cref="ArgumentException"></exception> private PSValidationKind Convert(ValidationKind value) { switch (value) { case ValidationKind.SystemValidation: return(PSValidationKind.SystemValidation); case ValidationKind.NamespaceValidation: return(PSValidationKind.NamespaceValidation); default: throw new ArgumentException(string.Format(StorageSyncResources.UnsupportedErrorFormat, value.GetType().Name, value)); } }