System.Xml.Schema.XsdValidator.ProcessInlineSchema C# (CSharp) Méthode

ProcessInlineSchema() private méthode

private ProcessInlineSchema ( ) : void
Résultat void
        private void ProcessInlineSchema() {
            if (!inlineSchemaParser.ParseReaderNode()) { // Done
                inlineSchemaParser.FinishParsing();
                XmlSchema schema = inlineSchemaParser.XmlSchema;
                string inlineNS = null;
                if (schema  != null && schema.ErrorCount == 0) {
                    try {
                        SchemaInfo inlineSchemaInfo = new SchemaInfo();
                        inlineSchemaInfo.SchemaType = SchemaType.XSD;
                        inlineNS = schema.TargetNamespace == null? string.Empty : schema.TargetNamespace;
                        if (!SchemaInfo.TargetNamespaces.Contains(inlineNS)) {
                            if (SchemaCollection.Add(inlineNS, inlineSchemaInfo, schema, true) != null) { //If no errors on compile
                                //Add to validator's SchemaInfo
                                SchemaInfo.Add(inlineSchemaInfo, EventHandler);
                            }
                        }
                    }
                    catch(XmlSchemaException e) {
                        SendValidationEvent(Res.Sch_CannotLoadSchema, new string[] {BaseUri.AbsoluteUri, e.Message}, XmlSeverityType.Error);
                    }
                }
                inlineSchemaParser = null;
            }
        }