System.Xml.BufferBuilder.BufferBuilder.Append C# (CSharp) Méthode

Append() public méthode

public Append ( string value, int start, int count ) : void
value string
start int
count int
Résultat void
        public void Append( string value, int start, int count) {
#if BUFFER_BUILDER_TRACING
            if ( s_TraceOutput != null ) {
                s_TraceOutput.WriteLine( "BufferBuilder.Append\tLength = " + count + "\t string fragment \"" + value.Substring( start, count ) + "\"" );
                totalAppendCount++;
            }
#endif
            if ( value == null ) {
                if ( start == 0 && count == 0 ) {
                    return;
                }
                throw new ArgumentNullException( "value" );
            }
            if ( count == 0 ) {
                return;
            }
            if ( start < 0 ) {
                throw new ArgumentOutOfRangeException( "start" );
            }
            if ( count < 0 || start + count > value.Length ) {
                throw new ArgumentOutOfRangeException( "count" );
            }
            if ( length + count <= MaxStringBuilderLength ) {
                if ( stringBuilder == null ) {
                    stringBuilder = new StringBuilder( value, start, count, 0 );
                }
                else {
                    stringBuilder.Append( value, start, count );
                }
                length += count;
            }
            else {
                unsafe {
                    fixed ( char* source = value ) {
                        AppendHelper( source + start, count );
                    }
                }
            }
        }

Same methods

BufferBuilder.BufferBuilder::Append ( char value ) : void
BufferBuilder.BufferBuilder::Append ( char value, int start, int count ) : void
BufferBuilder.BufferBuilder::Append ( string value ) : void