Casper.Network.SDK
Show / Hide Table of Contents

Class RpcLoggingHandler

Attach an RpcLoggingHandler to an instance of the RpcClient class to log request and response data to a writer stream.

Inheritance
object
HttpMessageHandler
DelegatingHandler
RpcLoggingHandler
Implements
IDisposable
Inherited Members
DelegatingHandler.Send(HttpRequestMessage, CancellationToken)
DelegatingHandler.InnerHandler
HttpMessageHandler.Dispose()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Casper.Network.SDK.JsonRpc
Assembly: Casper.Network.SDK.dll
Syntax
public class RpcLoggingHandler : DelegatingHandler, IDisposable

Constructors

| Edit this page View Source

RpcLoggingHandler(HttpMessageHandler)

Declaration
public RpcLoggingHandler(HttpMessageHandler innerHandler)
Parameters
Type Name Description
HttpMessageHandler innerHandler

Properties

| Edit this page View Source

LoggerStream

Declaration
public TextWriter LoggerStream { get; init; }
Property Value
Type Description
TextWriter

Methods

| Edit this page View Source

Dispose(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
DelegatingHandler.Dispose(bool)
| Edit this page View Source

SendAsync(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
DelegatingHandler.SendAsync(HttpRequestMessage, CancellationToken)
Exceptions
Type Condition
ArgumentNullException

The request was null.

Implements

IDisposable
  • Edit this page
  • View Source
In this article
Back to top Maintained by MAKE Technology LLC