Class Metadata.Entry
Metadata entry
Inheritance
Inherited Members
Namespace: Grpc.Core
Assembly: Grpc.Core.Api.dll
Syntax
public class Entry
Constructors
Entry(String, Byte[])
Initializes a new instance of the Metadata.Entry struct with a binary value.
Declaration
public Entry(string key, byte[] valueBytes)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Metadata key. Gets converted to lowercase. Needs to have suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores, hyphens and dots. |
System.Byte[] | valueBytes | Value bytes. |
Entry(String, String)
Initializes a new instance of the Metadata.Entry struct with an ASCII value.
Declaration
public Entry(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | Metadata key. Gets converted to lowercase. Must not use suffix indicating a binary valued metadata entry. Can only contain lowercase alphanumeric characters, underscores, hyphens and dots. |
System.String | value | Value string. Only ASCII characters are allowed. |
Properties
IsBinary
Returns true
if this entry is a binary-value entry.
Declaration
public bool IsBinary { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Key
Gets the metadata entry key.
Declaration
public string Key { get; }
Property Value
Type | Description |
---|---|
System.String |
Value
Gets the string value of this metadata entry.
Declaration
public string Value { get; }
Property Value
Type | Description |
---|---|
System.String |
ValueBytes
Gets the binary value of this metadata entry.
Declaration
public byte[] ValueBytes { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
ToString()
Returns a System.String that represents the current Metadata.Entry.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |