コード例 #1
0
 private void AddAttribute(string name, string value, HtmlTextWriterAttribute key, bool encode, bool isUrl) {
     if(_attrList == null) {
         _attrList = new RenderAttribute[20];
     }
     else if (_attrCount >= _attrList.Length) {
         RenderAttribute[] newArray = new RenderAttribute[_attrList.Length * 2];
         Array.Copy(_attrList, newArray, _attrList.Length);
         _attrList = newArray;
     }
     RenderAttribute attr;
     attr.name = name;
     attr.value = value;
     attr.key = key;
     attr.encode = encode;
     attr.isUrl = isUrl;
     _attrList[_attrCount] = attr;
     _attrCount++;
 }
コード例 #2
0
private void AddAttribute(string name, string value, HtmlTextWriterAttribute key, bool encode){
	if (_attrCount >= (int) _attrList.Length) {
		RenderAttribute[] rAttrArr = new RenderAttribute[_attrList.Length * 2];
		System.Array.Copy(_attrList, rAttrArr, (int) _attrList.Length);
		_attrList = rAttrArr;
	}
	RenderAttribute rAttr;
	rAttr.name = name;
	rAttr.value = value;
	rAttr.key = key;
	rAttr.encode = encode;
	_attrList [_attrCount++] = rAttr;
}
コード例 #3
0
 private void AddAttribute(string name, string value, HtmlTextWriterAttribute key, bool encode, bool isUrl)
 {
     RenderAttribute attribute;
     if (this._attrList == null)
     {
         this._attrList = new RenderAttribute[20];
     }
     else if (this._attrCount >= this._attrList.Length)
     {
         RenderAttribute[] destinationArray = new RenderAttribute[this._attrList.Length * 2];
         Array.Copy(this._attrList, destinationArray, this._attrList.Length);
         this._attrList = destinationArray;
     }
     attribute.name = name;
     attribute.value = value;
     attribute.key = key;
     attribute.encode = encode;
     attribute.isUrl = isUrl;
     this._attrList[this._attrCount] = attribute;
     this._attrCount++;
 }
コード例 #4
0
public HtmlTextWriter(TextWriter writer, string tabString) : base() {
	this.writer = writer;
	this.tabString = tabString;
	indentLevel = 0;
	tabsPending = false;
	_httpWriter = writer as HttpWriter;
	_isDescendant = GetType() == typeof(HtmlTextWriter) == false;
	_attrList = new RenderAttribute[20];
	_attrCount = 0;
	_styleList = new RenderStyle[20];
	_styleCount = 0;
	_endTags = new TagStackEntry[16];
	_endTagCount = 0;
	_inlineCount = 0;
}