NewLineDelimitedMessageHandler Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A JSON-RPC message handler that delimits messages with new lines.
public class NewLineDelimitedMessageHandler : StreamJsonRpc.PipeMessageHandler
type NewLineDelimitedMessageHandler = class
inherit PipeMessageHandler
Public Class NewLineDelimitedMessageHandler
Inherits PipeMessageHandler
- Inheritance
Remarks
When reading messages, either \n or \r\n character sequences are permitted for new lines. When writing messages the NewLine property controls which character sequence is used to terminate each message.
Constructors
NewLineDelimitedMessageHandler(IDuplexPipe, IJsonRpcMessageTextFormatter) |
Initializes a new instance of the NewLineDelimitedMessageHandler class. |
NewLineDelimitedMessageHandler(PipeWriter, PipeReader, IJsonRpcMessageTextFormatter) |
Initializes a new instance of the NewLineDelimitedMessageHandler class. |
NewLineDelimitedMessageHandler(Stream, Stream, IJsonRpcMessageTextFormatter) |
Initializes a new instance of the NewLineDelimitedMessageHandler class. |
Properties
CanRead |
Gets a value indicating whether this message handler can receive messages. (Inherited from PipeMessageHandler) |
CanWrite |
Gets a value indicating whether this message handler can send messages. (Inherited from PipeMessageHandler) |
DisposalToken |
Gets a token that is canceled when this instance is disposed. (Inherited from MessageHandlerBase) |
Formatter |
Gets the formatter used for message serialization. |
NewLine |
Gets or sets the new line sequence to use to terminate a JSON-RPC message. |
Reader |
Gets the reader to use for receiving messages. (Inherited from PipeMessageHandler) |
Writer |
Gets the writer to use for transmitting messages. (Inherited from PipeMessageHandler) |
Methods
Dispose() |
Obsolete.
Disposes this instance, and cancels any pending read or write operations. (Inherited from MessageHandlerBase) |
Dispose(Boolean) |
Disposes resources allocated by this instance that are common to both reading and writing. (Inherited from PipeMessageHandler) |
DisposeAsync() |
Disposes this instance, and cancels any pending read or write operations. (Inherited from MessageHandlerBase) |
DisposeReader() |
Disposes resources allocated by this instance that are used for reading (not writing). (Inherited from PipeMessageHandler) |
DisposeWriter() |
Disposes resources allocated by this instance that are used for writing (not reading). (Inherited from PipeMessageHandler) |
FlushAsync(CancellationToken) |
Ensures that all messages transmitted up to this point are en route to their destination, rather than sitting in some local buffer. (Inherited from PipeMessageHandler) |
ReadAsync(CancellationToken) |
Reads a distinct and complete message from the transport, waiting for one if necessary. (Inherited from MessageHandlerBase) |
ReadAtLeastAsync(Int32, Boolean, CancellationToken) |
Reads from the Reader until at least a specified number of bytes are available. (Inherited from PipeMessageHandler) |
ReadCoreAsync(CancellationToken) |
Reads a distinct and complete message, waiting for one if necessary. |
Write(JsonRpcMessage, CancellationToken) |
Writes a message to the pipe. |
WriteAsync(JsonRpcMessage, CancellationToken) |
Writes a message to the transport and flushes. (Inherited from MessageHandlerBase) |
WriteCoreAsync(JsonRpcMessage, CancellationToken) |
Writes a message. (Inherited from PipeMessageHandler) |
Explicit Interface Implementations
IDisposableObservable.IsDisposed |
Gets a value indicating whether this instance has been disposed. (Inherited from MessageHandlerBase) |
IJsonRpcMessageBufferManager.DeserializationComplete(JsonRpcMessage) |
Notifies that it is safe to free buffers held to deserialize the payload for a message because all deserialization attempts are completed. (Inherited from PipeMessageHandler) |