src/Shared/EntityFramework/Core/SchemaObjectModel/SchemaManager.cs
// <summary>
// Add the given list of newErrors to the error collection. If there is a error in the new errors,
// it sets the errorEncountered to true. Returns true if the number of errors encountered is more
// than max errors
// </summary>
Add the given list of newErrors to the error collection. If there is a error in the new errors,
it sets the errorEncountered to true. Returns true if the number of errors encountered is more
than max errors
Add the given list of newErrors to the error collection . If there is a error in the new errors it sets the errorEncountered to true . Returns true if the number of errors encountered is more than max errors
private static bool UpdateErrorCollectionAndCheckForMaxErrors(
            List<EdmSchemaError> errorCollection,
            IList<EdmSchemaError> newErrors, ref bool errorEncountered)
        {
            if (!errorEncountered)
            {
                if (!MetadataHelper.CheckIfAllErrorsAreWarnings(newErrors))
                {
                    errorEncountered = true;
                }
            }
            errorCollection.AddRange(newErrors);
            if (errorEncountered &&
                errorCollection.Where(e => e.Severity == EdmSchemaErrorSeverity.Error).Count() > MaxErrorCount)
            {
                return true;
            }
            return false;
        }
private static bool UpdateErrorCollectionAndCheckForMaxErrors ( List < EdmSchemaError > errorCollection , IList < EdmSchemaError > newErrors , ref bool errorEncountered ) { if ( ! errorEncountered ) { if ( ! MetadataHelper . CheckIfAllErrorsAreWarnings ( newErrors ) ) { errorEncountered = true ; } } errorCollection . AddRange ( newErrors ) ; if ( errorEncountered && errorCollection . Where ( e => e . Severity == EdmSchemaErrorSeverity . Error ) . Count ( ) > MaxErrorCount ) { return true ; } return false ; }
Add the given list of newErrors to the error collection.
Add the given list of newErrors to the error collection .
// If we have encountered error already in one of the schemas, then we don't need to check for errors in the remaining schemas. // Just keep aggregating the errors and throw them at the end. // Add the new errors to the error collection
errorCollection
List<EdmSchemaError>
newErrors
IList<EdmSchemaError>
bool
ref