Struct DerivedTypeIdentifier
- Namespace
- Nerdbank.MessagePack
- Assembly
- Nerdbank.MessagePack.dll
public struct DerivedTypeIdentifier : IEquatable<DerivedTypeIdentifier>
- Implements
- Inherited Members
Constructors
DerivedTypeIdentifier(int)
Initializes a new instance of the DerivedTypeIdentifier struct.
public DerivedTypeIdentifier(int alias)
Parameters
aliasintThe alias.
DerivedTypeIdentifier(string)
Initializes a new instance of the DerivedTypeIdentifier struct.
public DerivedTypeIdentifier(string alias)
Parameters
aliasstringThe alias.
Properties
IntAlias
Gets the int alias.
public int IntAlias { get; }
Property Value
Exceptions
MsgPackAlias
Gets the msgpack encoding of the alias.
public ReadOnlyMemory<byte> MsgPackAlias { get; }
Property Value
StringAlias
Gets the string alias.
public string StringAlias { get; }
Property Value
Exceptions
Type
Gets the type of this alias.
public DerivedTypeIdentifier.AliasType Type { get; }
Property Value
Utf8Alias
Gets the UTF-8 encoding of the string alias.
public ReadOnlyMemory<byte> Utf8Alias { get; }
Property Value
Exceptions
Methods
Equals(DerivedTypeIdentifier)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(DerivedTypeIdentifier other)
Parameters
otherDerivedTypeIdentifierAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override 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 int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
implicit operator DerivedTypeIdentifier(int)
Converts an int to a DerivedTypeIdentifier instance.
public static implicit operator DerivedTypeIdentifier(int alias)
Parameters
aliasintThe value of the type alias.
Returns
implicit operator DerivedTypeIdentifier(string)
Converts an string to a DerivedTypeIdentifier instance.
public static implicit operator DerivedTypeIdentifier(string alias)
Parameters
aliasstringThe value of the type alias.