Table of Contents

Struct RequestId

Namespace
Nerdbank.JsonRpc
Assembly
Nerdbank.JsonRpc.dll
[GenerateShape]
[MessagePackConverter(typeof(RequestId.Converter))]
public struct RequestId : IEquatable<RequestId>, IShapeable<RequestId>
Implements
Inherited Members

Constructors

RequestId(long)

Initializes a new instance of the RequestId struct with an integer value.

public RequestId(long value)

Parameters

value long

The request ID.

RequestId(ReadOnlyMemory<byte>)

Initializes a new instance of the RequestId struct with UTF-8 encoded bytes for a string value.

public RequestId(ReadOnlyMemory<byte> value)

Parameters

value ReadOnlyMemory<byte>

The UTF-8 encoded bytes of the string request ID.

RequestId(string)

Initializes a new instance of the RequestId struct with a string value.

public RequestId(string value)

Parameters

value string

The string request ID.

RequestId(ulong)

Initializes a new instance of the RequestId struct with an unsigned integer value.

public RequestId(ulong value)

Parameters

value ulong

The integer request ID.

Methods

Equals(RequestId)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(RequestId other)

Parameters

other RequestId

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override readonly int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override readonly string ToString()

Returns

string

The fully qualified type name.

Operators

implicit operator RequestId(long)

public static implicit operator RequestId(long value)

Parameters

value long

Returns

RequestId

implicit operator RequestId(ReadOnlyMemory<byte>)

public static implicit operator RequestId(ReadOnlyMemory<byte> value)

Parameters

value ReadOnlyMemory<byte>

Returns

RequestId

implicit operator RequestId(string)

public static implicit operator RequestId(string value)

Parameters

value string

Returns

RequestId