Show / Hide Table of Contents

Interface IMirrorContext

A MirrorClient instance’s configuration.

Namespace: Hashgraph
Assembly: Hashgraph.dll
Syntax
public interface IMirrorContext
Remarks

This interface exposes the current configuration context for a MirrorClient instance. When accessed thru a Configure(Action<IMirrorContext>), Clone(Action<IMirrorContext>) or one of the network request methods, calling code can interrogate the object for configuration details and update as necessary.
Typically, the bare minimum that must be configured in a context in order to access the mirror network is the URL of a mirror node server Url. The other default values are typically suitable for most interactions with the mirror network.

Properties

| Improve this Doc View Source

OnSendingRequest

Called by the library just before the serialized protobuf is sent to the Mirror Node. This is the only exposure the library provides to the underlying protobuf implementation (although they are publicly available in the library).
This method can be useful for logging and tracking purposes. It could also be used in advanced scenarios to modify the protobuf message just before sending.

Declaration
Action<IMessage> OnSendingRequest { get; set; }
Property Value
Type Description
Action<Google.Protobuf.IMessage>
| Improve this Doc View Source

Url

gRPC Address identifying a mirror node for access to the Hedera Mirror Network.

Declaration
string Url { get; set; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

Reset(String)

Clears a property on the context. This is the only way to clear a property value on the context so that a parent value can be used instead. Setting a value to

null
does not clear the value, it sets it to
null
for the current context and child contexts.

Declaration
void Reset(string name)
Parameters
Type Name Description
String name

The name of the property to reset, must be one of the public properties of the

IContext
. We suggest using the
nameof()
operator to ensure type safety.

Exceptions
Type Condition
ArgumentOutOfRangeException

when an invalid

name
is provided.

  • Improve this Doc
  • View Source
In This Article
Back to top .NET Client Library for Hedera Hashgraph