/// <summary> /// Gets or sets attributes for the given id. /// </summary> public IAttributeCollection this[uint id] { get { var p = this.Search(id, out _); if (p == _NO_DATA) { return(null); } return(_attributes.Get(p)); } set { int idx; var p = this.Search(id, out idx); if (p == _NO_DATA) { this.Add(id, _attributes.Add(value)); return; } _data[idx + 1] = _attributes.Add(value); } }
/// <summary> /// Adds a new tag collection. /// </summary> public static uint Add(this AttributesIndex index, params Attribute[] attributes) { return(index.Add(new AttributeCollection(attributes))); }
/// <summary> /// Adds a new attributes collection. /// </summary> public static uint Add(this AttributesIndex index, IEnumerable <Attribute> attributes) { return(index.Add(new AttributeCollection(attributes))); }