public void Append( char value ) {
#if BUFFER_BUILDER_TRACING
if ( s_TraceOutput != null ) {
s_TraceOutput.WriteLine( "BufferBuilder.Append\tLength = 1\tchar '" + value.ToString() + "'" );
totalAppendCount++;
}
#endif
if ( length + 1 <= MaxStringBuilderLength ) {
if ( stringBuilder == null ) {
stringBuilder = new StringBuilder();
}
stringBuilder.Append( value );
}
else {
if ( lastBuffer == null ) {
CreateBuffers();
}
if ( lastBufferIndex == lastBuffer.Length ) {
AddBuffer();
}
lastBuffer[lastBufferIndex++] = value;
}
length++;
}