internal static XmlSchemaType GetSchemaType(SchemaObjectDictionary schemaInfo, XmlQualifiedName typeName)
 {
     if (schemaInfo.TryGetValue(typeName, out SchemaObjectInfo schemaObjectInfo))
     {
         return(schemaObjectInfo.type);
     }
     return(null);
 }
 internal static XmlSchemaElement GetSchemaElement(SchemaObjectDictionary schemaInfo, XmlQualifiedName elementName)
 {
     if (schemaInfo.TryGetValue(elementName, out SchemaObjectInfo schemaObjectInfo))
     {
         return(schemaObjectInfo.element);
     }
     return(null);
 }
示例#3
0
 internal static XmlSchemaType GetSchemaType(SchemaObjectDictionary schemaInfo, XmlQualifiedName typeName)
 {
     SchemaObjectInfo schemaObjectInfo;
     if (schemaInfo.TryGetValue(typeName, out schemaObjectInfo))
     {
         return schemaObjectInfo.type;
     }
     return null;
 }
示例#4
0
 internal static XmlSchema GetSchemaWithType(SchemaObjectDictionary schemaInfo, XmlSchemaSet schemas, XmlQualifiedName typeName)
 {
     SchemaObjectInfo schemaObjectInfo;
     if (schemaInfo.TryGetValue(typeName, out schemaObjectInfo))
     {
         if (schemaObjectInfo.schema != null)
             return schemaObjectInfo.schema;
     }
     ICollection currentSchemas = schemas.Schemas();
     string ns = typeName.Namespace;
     foreach (XmlSchema schema in currentSchemas)
     {
         if (NamespacesEqual(ns, schema.TargetNamespace))
         {
             return schema;
         }
     }
     return null;
 }
        internal static XmlSchema GetSchemaWithType(SchemaObjectDictionary schemaInfo, XmlSchemaSet schemas, XmlQualifiedName typeName)
        {
            if (schemaInfo.TryGetValue(typeName, out SchemaObjectInfo schemaObjectInfo))
            {
                if (schemaObjectInfo.schema != null)
                {
                    return(schemaObjectInfo.schema);
                }
            }
            ICollection currentSchemas = schemas.Schemas();
            string      ns             = typeName.Namespace;

            foreach (XmlSchema schema in currentSchemas)
            {
                if (NamespacesEqual(ns, schema.TargetNamespace))
                {
                    return(schema);
                }
            }
            return(null);
        }
示例#6
0
 internal static XmlSchemaElement GetSchemaElement(SchemaObjectDictionary schemaInfo, XmlQualifiedName elementName)
 {
     SchemaObjectInfo schemaObjectInfo;
     if (schemaInfo.TryGetValue(elementName, out schemaObjectInfo))
     {
         return schemaObjectInfo.element;
     }
     return null;
 }