public int this[string name] { get { foreach (RTFAttribute a in this) { if (a.Name == name) { return(a.Value); } } return(int.MinValue); } set { foreach (RTFAttribute a in this) { if (a.Name == name) { a.Value = value; return; } } RTFAttribute item = new RTFAttribute(); item.Name = name; item.Value = value; this.List.Add(item); } }
public int Add(string name, int v) { RTFAttribute item = new RTFAttribute(); item.Name = name; item.Value = v; return(this.List.Add(item)); }
public void Remove(string name) { for (int iCount = this.Count - 1; iCount >= 0; iCount--) { RTFAttribute item = (RTFAttribute)this.List[iCount]; if (item.Name == name) { this.List.RemoveAt(iCount); } } }
public RTFAttributeList Clone() { RTFAttributeList list = new RTFAttributeList(); foreach (RTFAttribute item in this) { RTFAttribute newItem = new RTFAttribute(); newItem.Name = item.Name; newItem.Value = item.Value; list.List.Add(newItem); } return(list); }
public bool Contains(RTFAttribute item) { return(this.List.Contains(item)); }
public void Remove(RTFAttribute item) { this.List.Remove(item); }
public int Add(RTFAttribute item) { return(this.List.Add(item)); }