Class RpcLoggingHandler
Attach an RpcLoggingHandler to an instance of the RpcClient class to log request and response data to a writer stream.
Implements
Inherited Members
Namespace: Casper.Network.SDK.JsonRpc
Assembly: Casper.Network.SDK.dll
Syntax
public class RpcLoggingHandler : DelegatingHandler, IDisposable
Constructors
| Edit this page View SourceRpcLoggingHandler(HttpMessageHandler)
Declaration
public RpcLoggingHandler(HttpMessageHandler innerHandler)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpMessageHandler | innerHandler |
Properties
| Edit this page View SourceLoggerStream
Declaration
public TextWriter LoggerStream { get; init; }
Property Value
| Type | Description |
|---|---|
| TextWriter |
Methods
| Edit this page View SourceDispose(bool)
Releases the unmanaged resources used by the DelegatingHandler, and optionally disposes of the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | true to release both managed and unmanaged resources; false to releases only unmanaged resources. |
Overrides
| Edit this page View SourceSendAsync(HttpRequestMessage, CancellationToken)
Sends an HTTP request to the inner handler to send to the server as an asynchronous operation.
Declaration
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpRequestMessage | request | The HTTP request message to send to the server. |
| CancellationToken | cancellationToken | A cancellation token to cancel operation. |
Returns
| Type | Description |
|---|---|
| Task<HttpResponseMessage> | The task object representing the asynchronous operation. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | The |