示例#1
0
 protected IEnumerable <KeyValuePair <string, string> > GetAttributes()
 {
     foreach (var kvp in Attributes)
     {
         yield return(new KeyValuePair <string, string>(DomData.TokenName(kvp.Key), kvp.Value));
     }
 }
示例#2
0
        internal string IndexKey(string prefix, ushort keyTokenId, string path)
        {
#if DEBUG_PATH
            return(prefix + DomData.TokenName(keyTokenId) + DomData.indexSeparator + path);
#else
            return(prefix + (char)keyTokenId + DomData.indexSeparator + path);
#endif
        }
示例#3
0
 protected IEnumerable <KeyValuePair <string, string> > stylesEnumerable()
 {
     foreach (var kvp in Styles)
     {
         yield return(new KeyValuePair <string, string>(DomData.TokenName(kvp.Key), kvp.Value));
     }
     yield break;
 }
示例#4
0
        public string IndexKey(ushort attrId)
        {
#if DEBUG_PATH
            return("!" + DomData.TokenName(attrId) + DomData.indexSeparator + Owner.Path);
#else
            return("!" + (char)attrId + DomData.indexSeparator + Owner.Path);
#endif
        }
示例#5
0
        void ICollection <KeyValuePair <string, string> > .CopyTo(KeyValuePair <string, string>[] array, int arrayIndex)
        {
            array = new KeyValuePair <string, string> [Styles.Count];
            int index = 0;

            foreach (var kvp in Styles)
            {
                array[index++] = new KeyValuePair <string, string>(DomData.TokenName(kvp.Key), kvp.Value);
            }
        }
示例#6
0
 protected IEnumerable <KeyValuePair <string, string> > GetAttributes()
 {
     //foreach (var kvp in Attributes)
     //{
     //    yield return new KeyValuePair<string, string>(DomData.TokenName(kvp.Key).ToLower(), kvp.Value);
     //}
     for (int i = 0; i < InnerKeys.Count; i++)
     {
         yield return(new KeyValuePair <string, string>(DomData.TokenName(InnerKeys[i]).ToLower(), InnerValues[i]));
     }
 }
示例#7
0
        public override string ToString()
        {
            string style = String.Empty;

            if (HasStyles)
            {
                foreach (var kvp in Styles)
                {
                    style += DomData.TokenName(kvp.Key) + ":" + kvp.Value + ";";
                }
            }
            return(style);
        }
示例#8
0
        void ICollection <KeyValuePair <string, string> > .CopyTo(KeyValuePair <string, string>[] array, int arrayIndex)
        {
            //array = new KeyValuePair<string, string>[Attributes.Count];
            //int index = 0;
            //foreach (var kvp in Attributes)
            //{
            //    array[index++] = new KeyValuePair<string, string>(DomData.TokenName(kvp.Key), kvp.Value);
            //}

            array = new KeyValuePair <string, string> [InnerKeys.Count];
            for (int index = 0; index < InnerKeys.Count; index++)
            {
                array[index++] = new KeyValuePair <string, string>(DomData.TokenName(InnerKeys[index]), InnerValues[index]);
            }
        }