ATMLSchemaLibrary.managers.SchemaManager.GetRestrictions C# (CSharp) Method

GetRestrictions() public method

public GetRestrictions ( String name, List restrictions ) : bool
name String
restrictions List
return bool
        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;
        }

Same methods

SchemaManager::GetRestrictions ( String simpleTypeName, String targetNamespace ) : List