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
valuelongThe 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
valueReadOnlyMemory<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
valuestringThe string request ID.
RequestId(ulong)
Initializes a new instance of the RequestId struct with an unsigned integer value.
public RequestId(ulong value)
Parameters
valueulongThe 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
otherRequestIdAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
valuelong
Returns
implicit operator RequestId(ReadOnlyMemory<byte>)
public static implicit operator RequestId(ReadOnlyMemory<byte> value)
Parameters
valueReadOnlyMemory<byte>
Returns
implicit operator RequestId(string)
public static implicit operator RequestId(string value)
Parameters
valuestring