public static void Validate(VariantConfigurationOverride o, bool criticalOnly) { try { new VariantConfigurationOverrideValidation(o, criticalOnly).Validate(); } catch (NullOverrideException innerException) { throw new SettingOverrideNullException(innerException); } catch (FlightNameValidationException ex) { throw new SettingOverrideInvalidFlightNameException(ex.Override.ComponentName, string.Join(", ", ex.AllowedValues), ex); } catch (ComponentNameValidationException ex2) { throw new SettingOverrideInvalidComponentNameException(ex2.Override.ComponentName, string.Join(", ", ex2.AllowedValues), ex2); } catch (SectionNameValidationException ex3) { throw new SettingOverrideInvalidSectionNameException(ex3.Override.ComponentName, ex3.Override.SectionName, string.Join(", ", ex3.AllowedValues), ex3); } catch (ParameterNameValidationException ex4) { throw new SettingOverrideInvalidParameterNameException(ex4.Override.ComponentName, ex4.Override.SectionName, ex4.ParameterName, string.Join(", ", ex4.AllowedValues), ex4); } catch (ParameterSyntaxValidationException ex5) { throw new SettingOverrideInvalidParameterSyntaxException(ex5.Override.ComponentName, ex5.Override.SectionName, ex5.ParameterLine, ex5); } catch (VariantNameValidationException ex6) { throw new SettingOverrideInvalidVariantNameException(ex6.Override.ComponentName, ex6.Override.SectionName, ex6.VariantName, string.Join(", ", ex6.AllowedValues), ex6); } catch (VariantValueValidationException ex7) { throw new SettingOverrideInvalidVariantValueException(ex7.Override.ComponentName, ex7.Override.SectionName, ex7.Value, ex7.Variant.Type.Name, ex7.Format, ex7); } catch (SyntaxValidationException ex8) { throw new SettingOverrideSyntaxException(ex8.Override.ComponentName, ex8.Override.SectionName, "@(\"" + string.Join("\", \"", Array.ConvertAll <string, string>(ex8.Override.Parameters, (string parameter) => parameter.Replace("\"", "^\""))) + "\")", (ex8.InnerException != null) ? ex8.InnerException.Message : ex8.Message, ex8); } catch (OverrideValidationException ex9) { throw new SettingOverrideGenericException(ex9.GetType().Name, ex9.Override.ComponentName, ex9.Override.SectionName, SettingOverride.FormatParameters(ex9.Override.Parameters), ex9); } catch (Exception ex10) { throw new SettingOverrideUnexpectedException(ex10.GetType().Name, ex10); } }
public static void Validate(VariantConfigurationOverride o) { SettingOverride.Validate(o, false); }