private static void RegisterTag(string name, HtmlTextWriterTag key, TagType type) { string nameLCase = name.ToLower(CultureInfo.InvariantCulture); _tagKeyLookupTable.Add(nameLCase, key); // Pre-resolve the end tag string endTag = null; if (type != TagType.NonClosing && key != HtmlTextWriterTag.Unknown) { endTag = EndTagLeftChars + nameLCase + TagRightChar.ToString(CultureInfo.InvariantCulture); } if ((int)key < _tagNameLookupArray.Length) { _tagNameLookupArray[(int)key] = new TagInformation(name, type, endTag); } }
private static void RegisterTag(string name, HtmlTextWriterTag key, TagType type) { string str = name.ToLower(CultureInfo.InvariantCulture); _tagKeyLookupTable.Add(str, key); string closingTag = null; if ((type != TagType.NonClosing) && (key != HtmlTextWriterTag.Unknown)) { closingTag = "</" + str + '>'.ToString(CultureInfo.InvariantCulture); } if (key < _tagNameLookupArray.Length) { _tagNameLookupArray[(int) key] = new TagInformation(name, type, closingTag); } }