protected void mergeAttributes(BexisUITagType tagType, Dictionary <string, object> htmlAttributes) { //tag exist if (TagDictionary.ContainsKey(tagType)) { // get HtmlAttributeDic Dictionary <string, object> currentHtmlAttributeDic = TagDictionary[tagType]; foreach (KeyValuePair <string, object> kvp in htmlAttributes) { // htmlAttribute exist if (currentHtmlAttributeDic.ContainsKey(kvp.Key)) { currentHtmlAttributeDic[kvp.Key] = " " + kvp.Value; } // htmlAttribute not exist else { currentHtmlAttributeDic.Add(kvp.Key, kvp.Value); } } } //create tag dic add htmlattribute to the HtmlAttributeDic else { Dictionary <string, object> currentHtmlAttributeDic = new Dictionary <string, object>(); TagDictionary.Add(tagType, htmlAttributes); } }
protected void mergeAttribute(BexisUITagType tagType, string key, object value) { //tag exist if (TagDictionary.ContainsKey(tagType)) { // get HtmlAttributeDic Dictionary <string, object> currentHtmlAttributeDic = TagDictionary[tagType]; // htmlAttribute exist if (currentHtmlAttributeDic.ContainsKey(key)) { currentHtmlAttributeDic[key] += " " + value; } // htmlAttribute not exist else { currentHtmlAttributeDic.Add(key, value); } } //create tag dic add htmlattribute to the HtmlAttributeDic else { Dictionary <string, object> currentHtmlAttributeDic = new Dictionary <string, object>(); currentHtmlAttributeDic.Add(key, value); TagDictionary.Add(tagType, currentHtmlAttributeDic); } }
public void LoadLabelledGroups() { var sut = new TagDictionary("ident", XmlData); Assert.IsTrue(sut.ContainsKey("GDS")); }