System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors C# (CSharp) Метод

ThrowIfErrors() приватный Метод

private ThrowIfErrors ( bool ignoreLocal ) : void
ignoreLocal bool
Результат void
        internal void ThrowIfErrors(bool ignoreLocal) {
            if (HasErrors(ignoreLocal)) {
                if (HasGlobalErrors) {
                    // Throw just the global errors, as they invalidate
                    // all other config file parsing.
                    throw new ConfigurationErrorsException(_errorsGlobal);
                }
                else {
                    // Throw all errors no matter what
                    throw new ConfigurationErrorsException(_errorsAll);
                }
            }
        }

Usage Example

 // ThrowIfParseErrors
 //
 // Throw if there were parse errors detected
 //
 private void ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors) {
     schemaErrors.ThrowIfErrors(ClassFlags[ClassIgnoreLocalErrors]);
 }