Microsoft.AspNet.SignalR.Infrastructure.MemoryPoolTextWriter.Flush C# (CSharp) Method

Flush() public method

public Flush ( ) : void
return void
        public override void Flush()
        {
            while (_textBegin != _textEnd)
            {
                Encode(true);
            }
        }

Usage Example

        public void StringOverrideBehavesAsCharArray()
        {
            var writer = new MemoryPoolTextWriter(new MemoryPool());
            var testTxt = new string('m', 260);

            writer.Write(testTxt.ToCharArray(), 0, testTxt.Length);
            writer.Flush();

            var encoding = new UTF8Encoding();
            Assert.Equal(testTxt, encoding.GetString(writer.Buffer.ToArray()));
        }
All Usage Examples Of Microsoft.AspNet.SignalR.Infrastructure.MemoryPoolTextWriter::Flush