System.Xml.Schema.XmlSchemaValidator.ProcessSchemaLocations C# (CSharp) Method

ProcessSchemaLocations() private method

private ProcessSchemaLocations ( string xsiSchemaLocation, string xsiNoNamespaceSchemaLocation ) : void
xsiSchemaLocation string
xsiNoNamespaceSchemaLocation string
return void
        private void ProcessSchemaLocations(string xsiSchemaLocation, string xsiNoNamespaceSchemaLocation)
        {
            bool compile = false;
            if (xsiNoNamespaceSchemaLocation != null)
            {
                compile = true;
                LoadSchema(string.Empty, xsiNoNamespaceSchemaLocation);
            }
            if (xsiSchemaLocation != null)
            {
                object typedValue;
                Exception exception = s_dtStringArray.TryParseValue(xsiSchemaLocation, _nameTable, _nsResolver, out typedValue);
                if (exception != null)
                {
                    SendValidationEvent(SR.Sch_InvalidValueDetailedAttribute, new string[] { "schemaLocation", xsiSchemaLocation, s_dtStringArray.TypeCodeString, exception.Message }, exception);
                    return;
                }
                string[] locations = (string[])typedValue;
                compile = true;
                try
                {
                    for (int j = 0; j < locations.Length - 1; j += 2)
                    {
                        LoadSchema((string)locations[j], (string)locations[j + 1]);
                    }
                }
                catch (XmlSchemaException schemaException)
                {
                    SendValidationEvent(schemaException);
                }
            }
            if (compile)
            {
                RecompileSchemaSet();
            }
        }