public bool GetRestrictions( String name, List<XmlSchemaSimpleTypeRestriction> restrictions )
{
bool hasRestriction = false;
//Lookup into Simple Type Map
if (_simpleTypes.ContainsKey( name ))
{
XmlSchemaSimpleType simpleType = _simpleTypes[name];
object item = simpleType.Content;
if (item is XmlSchemaSimpleTypeRestriction)
{
var restriction = (XmlSchemaSimpleTypeRestriction) item;
restrictions.Add( restriction );
if (restriction.BaseTypeName != null)
{
GetRestrictions( restriction.BaseTypeName.Name, restrictions );
hasRestriction = true;
}
}
}
return hasRestriction;
}