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

AppendHelper() private méthode

private AppendHelper ( char pSource, int count ) : void
pSource char
count int
Résultat void
        unsafe private void AppendHelper( char* pSource, int count )  {
            if ( lastBuffer == null ) {
                CreateBuffers();
            }
            int copyCount = 0;
            while ( count > 0 ) {
                if ( lastBufferIndex >= lastBuffer.Length ) {
                    AddBuffer();
                }

                copyCount = count;
				int free = lastBuffer.Length - lastBufferIndex;
                if ( free < copyCount ) {
                    copyCount = free;
                }

                fixed ( char* pLastBuffer = &lastBuffer[lastBufferIndex] ) {
                    wstrcpy( pLastBuffer, pSource, copyCount );
                }
                pSource += copyCount;
				length += copyCount;
				lastBufferIndex += copyCount;
                count -= copyCount;
            }
        }