Skip to content
Meshline
SDK 1.1.0 · TypeView source on GitHub

Developer guide · API index

Members on this page

Meshline.Sdk

Meshline.Models

NetworkContext Class

Identifies a Meshline network by its Neo network reference and registry contract script hash.

public sealed record NetworkContext : System.IParsable<Meshline.Models.NetworkContext>, System.IEquatable<Meshline.Models.NetworkContext>

Inheritance System.Object → NetworkContext

Implements System.IParsable<NetworkContext>, System.IEquatable<NetworkContext>

Properties

NetworkContext.Reference Property

The unsigned Neo network reference used in the canonical network identifier.

public uint Reference { get; init; }

Property Value

System.UInt32

NetworkContext.Registry Property

The registry contract's lowercase 160-bit script hash, including the 0x prefix.

public string Registry { get; init; }

Property Value

System.String

Methods

NetworkContext.Parse(string, IFormatProvider) Method

Parses a canonical neo:reference:registry network identifier.

public static Meshline.Models.NetworkContext Parse(string s, System.IFormatProvider? provider=null);

Parameters

s System.String

The canonical network identifier text.

provider System.IFormatProvider

Unused; network identifiers are parsed using invariant rules.

Implements Parse(string, IFormatProvider)

Returns

NetworkContext
The network context represented by the input.

Exceptions

System.FormatException
The input is not a canonical network identifier.

NetworkContext.ToString() Method

Returns the canonical neo:reference:registry network identifier.

public override string ToString();

Returns

System.String
The canonical invariant network identifier.

NetworkContext.TryParse(string, NetworkContext) Method

Attempts to parse a canonical neo:reference:registry network identifier.

public static bool TryParse(string? s, out Meshline.Models.NetworkContext? result);

Parameters

s System.String

The canonical network identifier text.

result NetworkContext

Receives the parsed context on success, or null on failure.

Returns

System.Boolean
true if parsing succeeds; otherwise, false.

NetworkContext.TryParse(string, IFormatProvider, NetworkContext) Method

Attempts to parse a canonical neo:reference:registry network identifier.

public static bool TryParse(string? s, System.IFormatProvider? provider, out Meshline.Models.NetworkContext? result);

Parameters

s System.String

The canonical network identifier text.

provider System.IFormatProvider

Unused; network identifiers are parsed using invariant rules.

result NetworkContext

Receives the parsed context on success, or null on failure.

Returns

System.Boolean
true if parsing succeeds; otherwise, false.