/// <summary> /// Converts a <see cref="DataValidationErrorAlertStyle"/> to a <see cref="ValidationAlertType"/>. /// </summary> /// <param name="dataValidationErrorAlertStyle">The data validation error alert style to convert.</param> /// <returns> /// A <see cref="ValidationAlertType"/> converted from a <see cref="DataValidationErrorAlertStyle"/>. /// </returns> /// <exception cref="ArgumentOutOfRangeException"><paramref name="dataValidationErrorAlertStyle"/> is <see cref="DataValidationErrorAlertStyle.Unknown"/>.</exception> public static ValidationAlertType ToValidationAlertType( this DataValidationErrorAlertStyle dataValidationErrorAlertStyle) { if (dataValidationErrorAlertStyle == DataValidationErrorAlertStyle.Unknown) { throw new ArgumentOutOfRangeException(Invariant($"'{nameof(dataValidationErrorAlertStyle)}' == '{DataValidationErrorAlertStyle.Unknown}'"), (Exception)null); } switch (dataValidationErrorAlertStyle) { case DataValidationErrorAlertStyle.Information: return(ValidationAlertType.Information); case DataValidationErrorAlertStyle.Stop: return(ValidationAlertType.Stop); case DataValidationErrorAlertStyle.Warning: return(ValidationAlertType.Warning); default: throw new NotSupportedException(Invariant($"This {nameof(DataValidationErrorAlertStyle)} is not supported: {dataValidationErrorAlertStyle}")); } }
public virtual DataValidation DeepCloneWithErrorAlertStyle(DataValidationErrorAlertStyle errorAlertStyle) { throw new NotImplementedException("This method should be abstract. It was generated as virtual so that you aren't forced to override it when you create a new model that derives from this model. It will be overridden in the generated designer file."); }