 | QueuedMessageReaderReadAsync Method |
[This is preliminary documentation and is subject to change.]
Asynchronously reads the next message that matches the
Namespace:
JsonRpc.Streams
Assembly:
JsonRpc.Streams (in JsonRpc.Streams.dll) Version: 0.5.4+1bad715934a0ae5922832940ca44bbbdaa509cfe
Syntaxpublic override Task<Message> ReadAsync(
Predicate<Message> filter,
CancellationToken cancellationToken
)
Public Overrides Function ReadAsync (
filter As Predicate(Of Message),
cancellationToken As CancellationToken
) As Task(Of Message)
Dim instance As QueuedMessageReader
Dim filter As Predicate(Of Message)
Dim cancellationToken As CancellationToken
Dim returnValue As Task(Of Message)
returnValue = instance.ReadAsync(filter,
cancellationToken)
public:
virtual Task<Message^>^ ReadAsync(
Predicate<Message^>^ filter,
CancellationToken cancellationToken
) override
abstract ReadAsync :
filter : Predicate<Message> *
cancellationToken : CancellationToken -> Task<Message>
override ReadAsync :
filter : Predicate<Message> *
cancellationToken : CancellationToken -> Task<Message>
Parameters
- filter
- Type: SystemPredicateMessage
The expected type of the message. - cancellationToken
- Type: System.ThreadingCancellationToken
A token that cancels the operation.
Return Value
Type:
TaskMessage
The next JSON RPC message, or
null if no more messages exist.
Exceptions
RemarksThis method should be thread-safe.
See Also