protected IEnumerable <KeyValuePair <string, string> > GetAttributes() { foreach (var kvp in Attributes) { yield return(new KeyValuePair <string, string>(DomData.TokenName(kvp.Key), kvp.Value)); } }
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 }
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; }
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 }
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); } }
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])); } }
public override string ToString() { string style = String.Empty; if (HasStyles) { foreach (var kvp in Styles) { style += DomData.TokenName(kvp.Key) + ":" + kvp.Value + ";"; } } return(style); }
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]); } }