예제 #1
0
 public HtmlAttribute GetAttribute()
 {
     if (hash >= 0)
     {
         return((HtmlAttribute)hash);
     }
     hash = (int)HtmlAttributeHash.GetAttribute(Source, Name.Name.StartIndex, Name.Name.Length);
     return((HtmlAttribute)hash);
 }
예제 #2
0
        public void GetTokenHash_Should_Work_With_Actual_ArraySegment()
        {
            var actual = HtmlAttributeHash.GetAttribute("prefix title suffix".ToArray(), 7, 5);

            Assert.AreEqual(HtmlAttribute.Title, actual);
        }
예제 #3
0
 public void GetTokenHash_Should_Resolve_Hash_For_UppercaseTags()
 {
     HtmlTestExtentions.TestHash(attrList, x => (int)HtmlAttributeHash.GetAttribute(x.ToUpper().ToArray(), 0, x.Length));
 }