AspNetEdit.Editor.Persistence.TagAttributes.GetDictionary C# (CSharp) Method

GetDictionary() public method

public GetDictionary ( string key ) : Hashtable
key string
return System.Collections.Hashtable
        public Hashtable GetDictionary(string key)
        {
            if (got_hashed)
                return atts_hash;

            if (tmp_hash == null)
                tmp_hash = new Hashtable (CaseInsensitiveHashCodeProvider.DefaultInvariant,
                              CaseInsensitiveComparer.DefaultInvariant);

            tmp_hash.Clear ();
            for (int i = keys.Count - 1; i >= 0; i--)
                if (key == null || String.Compare (key, (string) keys [i], true) == 0)
                    tmp_hash [keys [i]] = values [i];

            return tmp_hash;
        }

Usage Example

Beispiel #1
0
        /// <summary>
        /// Creates a ParsingObject as a child of this one, and returns it.
        /// </summary>
        public virtual ParsingObject CreateChildParsingObject(ILocation location, string tagid, TagAttributes attributes)
        {
            string[] str = tagid.Split(':');

            //html tags
            //TODO: check for valid tags?
            if (str.Length == 1)
            {
                if (attributes.IsRunAtServer() && (0 == string.Compare("form", tagid)))
                {
                    return(new ServerFormParsingObject(location.PlainText, tagid, this));
                }
                return(new HtmlParsingObject(location.PlainText, tagid, this));
            }

            //fall through to server tags
            if (str.Length != 2)
            {
                throw new ParseException(location, "Server tag name is not of form prefix:name");
            }

            Type tagType = WebFormReferenceManager.GetObjectType(str[0], str[1]);

            if (tagType == null)
            {
                throw new ParseException(location, "The tag " + tagid + "has not been registered");
            }

            return(new ServerObjectParsingObject(tagType, attributes.GetDictionary(null), tagid, this));
        }
All Usage Examples Of AspNetEdit.Editor.Persistence.TagAttributes::GetDictionary