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; } } var item = new RTFAttribute(); item.Name = name; item.Value = value; List.Add(item); } }
public int Add(string name, int v) { var item = new RTFAttribute(); item.Name = name; item.Value = v; return(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() { var list = new RTFAttributeList(); foreach (RTFAttribute item in this) { var newItem = new RTFAttribute(); newItem.Name = item.Name; newItem.Value = item.Value; list.List.Add(newItem); } return(list); }
public void Remove(RTFAttribute item) { this.List.Remove(item); }
public bool Contains(RTFAttribute item) { return this.List.Contains(item); }
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 int Add(string name, int v) { RTFAttribute item = new RTFAttribute(); item.Name = name; item.Value = v; return this.List.Add(item); }
public int Add(RTFAttribute item) { return this.List.Add(item); }
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 bool Contains(RTFAttribute item) { return(List.Contains(item)); }
public void Remove(RTFAttribute item) { List.Remove(item); }
public int Add(RTFAttribute item) { return(List.Add(item)); }