[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System.Xml XmlTextReader.cs,1.34,1.35
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System.Xml XmlTextReader.cs,1.34,1.35 |
Date: |
Sun, 23 Feb 2003 19:29:48 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System.Xml
In directory subversions:/tmp/cvs-serv4814/System.Xml
Modified Files:
XmlTextReader.cs
Log Message:
ReadIdentifier: append the character to the string builder after
testing for terminating characters, to avoid the use of
"ToString(0, length - 1)", which is less efficient than "ToString()".
Index: XmlTextReader.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Xml/XmlTextReader.cs,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** XmlTextReader.cs 27 Jan 2003 15:47:08 -0000 1.34
--- XmlTextReader.cs 24 Feb 2003 00:29:46 -0000 1.35
***************
*** 494,498 ****
while((ch = ReadChar()) != -1)
{
- builder.Append((char)ch);
if((char)ch == '/')
{
--- 494,497 ----
***************
*** 502,506 ****
isEmpty = true;
readAttribute = false;
! return builder.ToString(0,
builder.Length -1);
}
else if((char)ch == '>')
--- 501,505 ----
isEmpty = true;
readAttribute = false;
! return builder.ToString();
}
else if((char)ch == '>')
***************
*** 508,512 ****
nodeType = XmlNodeType.Element;
readAttribute = false;
! return builder.ToString(0,
builder.Length -1);
}
else if (Char.IsWhiteSpace((char)ch))
--- 507,511 ----
nodeType = XmlNodeType.Element;
readAttribute = false;
! return builder.ToString();
}
else if (Char.IsWhiteSpace((char)ch))
***************
*** 519,523 ****
readAttribute = true;
! return
builder.ToString(0, builder.Length -1);
}
else if((char)ch == '>')
--- 518,522 ----
readAttribute = true;
! return
builder.ToString();
}
else if((char)ch == '>')
***************
*** 525,529 ****
nodeType =
XmlNodeType.Element;
readAttribute = false;
! return
builder.ToString(0, builder.Length -1);
}
else if((char)ch == '/')
--- 524,528 ----
nodeType =
XmlNodeType.Element;
readAttribute = false;
! return
builder.ToString();
}
else if((char)ch == '/')
***************
*** 534,541 ****
isEmpty = true;
readAttribute = false;
! return
builder.ToString(0, builder.Length -1);
}
}
!
}
return null;
--- 533,540 ----
isEmpty = true;
readAttribute = false;
! return
builder.ToString();
}
}
! builder.Append((char)ch);
}
return null;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System.Xml XmlTextReader.cs,1.34,1.35,
Rhys Weatherley <address@hidden> <=