System.Xml.Schema.SchemaInfo.HasSchema C# (CSharp) Méthode

HasSchema() public méthode

public HasSchema ( string ns ) : bool
ns string
Résultat bool
        public bool HasSchema(string ns) {
            return targetNamespaces[ns] != null;
        }
        

Usage Example

Exemple #1
0
 private void ProcessInlineSchema()
 {
     if (!inlineSchemaParser.ParseReaderNode())   // Done
     {
         inlineSchemaParser.FinishParsing();
         SchemaInfo xdrSchema = inlineSchemaParser.XdrSchema;
         if (xdrSchema != null && xdrSchema.ErrorCount == 0)
         {
             foreach (string inlineNS in xdrSchema.TargetNamespaces.Keys)
             {
                 if (!SchemaInfo.HasSchema(inlineNS))
                 {
                     schemaInfo.Add(xdrSchema, EventHandler);
                     SchemaCollection.Add(inlineNS, xdrSchema, null, false);
                     break;
                 }
             }
         }
         inlineSchemaParser = null;
     }
 }