public HtmlAttribute GetAttribute() { if (hash >= 0) { return((HtmlAttribute)hash); } hash = (int)HtmlAttributeHash.GetAttribute(Source, Name.Name.StartIndex, Name.Name.Length); return((HtmlAttribute)hash); }
public void GetTokenHash_Should_Work_With_Actual_ArraySegment() { var actual = HtmlAttributeHash.GetAttribute("prefix title suffix".ToArray(), 7, 5); Assert.AreEqual(HtmlAttribute.Title, actual); }
public void GetTokenHash_Should_Resolve_Hash_For_UppercaseTags() { HtmlTestExtentions.TestHash(attrList, x => (int)HtmlAttributeHash.GetAttribute(x.ToUpper().ToArray(), 0, x.Length)); }