Class CachedString
Caches a string's byte representation to be used for certain methods like IChannel.BasicPublish/>.
public sealed class CachedString
- Inheritance
-
CachedString
- Inherited Members
Constructors
CachedString(ReadOnlyMemory<byte>)
Creates a new CachedString based on the provided bytes.
public CachedString(ReadOnlyMemory<byte> bytes)
Parameters
bytes
ReadOnlyMemory<byte>The bytes.
CachedString(string)
Creates a new CachedString based on the provided string.
public CachedString(string value)
Parameters
value
stringThe string to cache.
CachedString(string, ReadOnlyMemory<byte>)
Creates a new CachedString based on the provided values.
public CachedString(string value, ReadOnlyMemory<byte> bytes)
Parameters
value
stringThe string to cache.
bytes
ReadOnlyMemory<byte>The byte representation of the string value.
Fields
Bytes
Gets the bytes representing the Value.
public readonly ReadOnlyMemory<byte> Bytes
Field Value
Empty
public static readonly CachedString Empty
Field Value
Value
The string value to cache.
public readonly string Value