Class Metadata.Entry (2.63.0)

 public class Metadata.Entry 

Metadata entry

Inheritance

object > Metadata.Entry

Namespace

Grpc.Core

Assembly

Grpc.Core.Api.dll

Constructors

 public Entry(string key, byte[] valueBytes) 

Initializes a new instance of the Metadata.Entry struct with a binary value.

Parameters
Name
Description
key
string

Metadata key. Gets converted to lowercase. Needs to have -bin suffix indicating a binary-valued metadata entry. The binary header suffix can be added to the key with BinaryHeaderSuffix . Can only contain lowercase alphanumeric characters, underscores, hyphens, and dots.

valueBytes
byte

Value bytes.

 public Entry(string key, string value) 

Initializes a new instance of the Metadata.Entry struct with an ASCII value.

Parameters
Name
Description
key
string

Metadata key. Gets converted to lowercase. Must not use '-bin' suffix indicating a binary-valued metadata entry. Can only contain lowercase alphanumeric characters, underscores, hyphens, and dots.

value
string

Value string. Only ASCII characters are allowed.

Properties

 public bool IsBinary { get; } 

Returns true if this entry is a binary-value entry.

Property Value
Type
Description
 public string Key { get; } 

Gets the metadata entry key.

Property Value
Type
Description
 public string Value { get; } 

Gets the string value of this metadata entry. If the metadata entry is binary then an exception is thrown.

Property Value
Type
Description
 public byte[] ValueBytes { get; } 

Gets the binary value of this metadata entry. If the metadata entry is not binary the string value will be returned as ASCII encoded bytes.

Property Value
Type
Description

Methods

 public override string ToString() 

Returns a string that represents the current Metadata.Entry .

Returns
Type
Description
Overrides
Create a Mobile Website
View Site in Mobile | Classic
Share by: