Inheritance: XmlSchemaAnnotated
示例#1
0
 private void NavigateSimpleTypeContent(XmlSchemaSimpleTypeContent simpleTypeContent)
 {
     // TODO: Refactor to SimpleTypeContentHandlerMap?
     if(simpleTypeContent is XmlSchemaSimpleTypeRestriction)
         NavigateSimpleTypeRestriction((XmlSchemaSimpleTypeRestriction)simpleTypeContent);
     else if(simpleTypeContent is XmlSchemaSimpleTypeUnion)
         NavigateSimpleTypeUnion((XmlSchemaSimpleTypeUnion)simpleTypeContent);
     else if(simpleTypeContent is XmlSchemaSimpleTypeList)
         NavigateSimpleTypeList((XmlSchemaSimpleTypeList)simpleTypeContent);
 }
        protected virtual void Visit(XmlSchemaSimpleTypeContent simpleTypeContent)
        {
            XmlSchemaSimpleTypeList list;
            XmlSchemaSimpleTypeRestriction restriction;
            XmlSchemaSimpleTypeUnion union;

            if (Casting.TryCast(simpleTypeContent, out list))
                Visit(list);
            else if (Casting.TryCast(simpleTypeContent, out restriction))
                Visit(restriction);
            else if (Casting.TryCast(simpleTypeContent, out union))
                Visit(union);
            else
                throw ExceptionBuilder.UnexpectedSchemaObjectType(simpleTypeContent);
        }
 public SimpleTypeStructureNode GetSimpleTypeStructure(XmlSchemaSimpleTypeContent content)
 {
     var simpleTypeStructureBuilder = new SimpleTypeStructureBuilder(SchemaSet);
     simpleTypeStructureBuilder.Traverse(content);
     return simpleTypeStructureBuilder.GetRoot();
 }