private XmlSchemaObject GetContainer(State state)
{
XmlSchemaObject container = null;
switch (state)
{
case State.Root:
break;
case State.Schema:
container = _schema;
break;
case State.Annotation:
container = _annotation;
break;
case State.Include:
container = _include;
break;
case State.Import:
container = _import;
break;
case State.Element:
container = _element;
break;
case State.Attribute:
container = _attribute;
break;
case State.AttributeGroup:
container = _attributeGroup;
break;
case State.AttributeGroupRef:
container = _attributeGroupRef;
break;
case State.AnyAttribute:
container = _anyAttribute;
break;
case State.Group:
container = _group;
break;
case State.GroupRef:
container = _groupRef;
break;
case State.All:
container = _all;
break;
case State.Choice:
container = _choice;
break;
case State.Sequence:
container = _sequence;
break;
case State.Any:
container = _anyElement;
break;
case State.Notation:
container = _notation;
break;
case State.SimpleType:
container = _simpleType;
break;
case State.ComplexType:
container = _complexType;
break;
case State.ComplexContent:
container = _complexContent;
break;
case State.ComplexContentExtension:
container = _complexContentExtension;
break;
case State.ComplexContentRestriction:
container = _complexContentRestriction;
break;
case State.SimpleContent:
container = _simpleContent;
break;
case State.SimpleContentExtension:
container = _simpleContentExtension;
break;
case State.SimpleContentRestriction:
container = _simpleContentRestriction;
break;
case State.SimpleTypeUnion:
container = _simpleTypeUnion;
break;
case State.SimpleTypeList:
container = _simpleTypeList;
break;
case State.SimpleTypeRestriction:
container = _simpleTypeRestriction;
break;
case State.Unique:
case State.Key:
case State.KeyRef:
container = _identityConstraint;
break;
case State.Selector:
case State.Field:
container = _xpath;
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:
container = _facet;
break;
case State.AppInfo:
container = _appInfo;
break;
case State.Documentation:
container = _documentation;
break;
case State.Redefine:
container = _redefine;
break;
default:
Debug.Assert(false, "State is " + state);
break;
}
return container;
}