private void SetContainer(State state, object container)
{
switch (state)
{
case State.Root:
break;
case State.Schema:
break;
case State.Annotation:
_annotation = (XmlSchemaAnnotation)container;
break;
case State.Include:
_include = (XmlSchemaInclude)container;
break;
case State.Import:
_import = (XmlSchemaImport)container;
break;
case State.Element:
_element = (XmlSchemaElement)container;
break;
case State.Attribute:
_attribute = (XmlSchemaAttribute)container;
break;
case State.AttributeGroup:
_attributeGroup = (XmlSchemaAttributeGroup)container;
break;
case State.AttributeGroupRef:
_attributeGroupRef = (XmlSchemaAttributeGroupRef)container;
break;
case State.AnyAttribute:
_anyAttribute = (XmlSchemaAnyAttribute)container;
break;
case State.Group:
_group = (XmlSchemaGroup)container;
break;
case State.GroupRef:
_groupRef = (XmlSchemaGroupRef)container;
break;
case State.All:
_all = (XmlSchemaAll)container;
break;
case State.Choice:
_choice = (XmlSchemaChoice)container;
break;
case State.Sequence:
_sequence = (XmlSchemaSequence)container;
break;
case State.Any:
_anyElement = (XmlSchemaAny)container;
break;
case State.Notation:
_notation = (XmlSchemaNotation)container;
break;
case State.SimpleType:
_simpleType = (XmlSchemaSimpleType)container;
break;
case State.ComplexType:
_complexType = (XmlSchemaComplexType)container;
break;
case State.ComplexContent:
_complexContent = (XmlSchemaComplexContent)container;
break;
case State.ComplexContentExtension:
_complexContentExtension = (XmlSchemaComplexContentExtension)container;
break;
case State.ComplexContentRestriction:
_complexContentRestriction = (XmlSchemaComplexContentRestriction)container;
break;
case State.SimpleContent:
_simpleContent = (XmlSchemaSimpleContent)container;
break;
case State.SimpleContentExtension:
_simpleContentExtension = (XmlSchemaSimpleContentExtension)container;
break;
case State.SimpleContentRestriction:
_simpleContentRestriction = (XmlSchemaSimpleContentRestriction)container;
break;
case State.SimpleTypeUnion:
_simpleTypeUnion = (XmlSchemaSimpleTypeUnion)container;
break;
case State.SimpleTypeList:
_simpleTypeList = (XmlSchemaSimpleTypeList)container;
break;
case State.SimpleTypeRestriction:
_simpleTypeRestriction = (XmlSchemaSimpleTypeRestriction)container;
break;
case State.Unique:
case State.Key:
case State.KeyRef:
_identityConstraint = (XmlSchemaIdentityConstraint)container;
break;
case State.Selector:
case State.Field:
_xpath = (XmlSchemaXPath)container;
break;
case State.MinExclusive:
case State.MinInclusive:
case State.MaxExclusive:
case State.MaxInclusive:
case State.TotalDigits:
case State.FractionDigits:
case State.Length:
case State.MinLength:
case State.MaxLength:
case State.Enumeration:
case State.Pattern:
case State.WhiteSpace:
_facet = (XmlSchemaFacet)container;
break;
case State.AppInfo:
_appInfo = (XmlSchemaAppInfo)container;
break;
case State.Documentation:
_documentation = (XmlSchemaDocumentation)container;
break;
case State.Redefine:
_redefine = (XmlSchemaRedefine)container;
break;
default:
Debug.Assert(false, "State is " + state);
break;
}
}