public void Add(HtmlTextWriterStyle key, string value) { if (_intTable == null) { _intTable = new HybridDictionary(); } _intTable[(int)key] = value; string name = CssTextWriter.GetStyleName(key); if (name.Length != 0) { // Remove from the other table to avoid duplicates. if (_table == null) { ParseString(); } _table.Remove(name); } if (_state != null) { // keep style attribute synchronized _state["style"] = BuildString(); } _style = null; }
public void Add(HtmlTextWriterStyle key, string value) { if (this._intTable == null) { this._intTable = new HybridDictionary(); } this._intTable[(int)key] = value; string styleName = CssTextWriter.GetStyleName(key); if (styleName.Length != 0) { if (this._table == null) { this.ParseString(); } this._table.Remove(styleName); } if (this._state != null) { this._state["style"] = this.BuildString(); } this._style = null; }