Table of Contents

Class NatsHeaders

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

Represents a wrapper for RequestHeaders and ResponseHeaders.

public class NatsHeaders : IDictionary<string, StringValues>, ICollection<KeyValuePair<string, StringValues>>, IEnumerable<KeyValuePair<string, StringValues>>, IEnumerable
Inheritance
NatsHeaders
Implements
Inherited Members

Constructors

NatsHeaders()

Initializes a new instance of NatsHeaders.

NatsHeaders(Dictionary<string, StringValues>?)

Initializes a new instance of NatsHeaders.

NatsHeaders(int)

Initializes a new instance of NatsHeaders.

Properties

Code
Count

Gets the number of elements contained in the NatsHeaders;.

Error
IsReadOnly

Gets a value that indicates whether the NatsHeaders is in read-only mode.

this[string]

Get or sets the associated value from the collection as a single string.

Keys

Gets the collection of HTTP header names in this instance.

Message
MessageText
Values

Gets the collection of HTTP header values in this instance.

Version

Methods

Add(KeyValuePair<string, StringValues>)

Adds a new header item to the collection.

Add(string, StringValues)

Adds the given header and values to the collection.

Clear()

Clears the entire list of objects.

Contains(KeyValuePair<string, StringValues>)

Returns a value indicating whether the specified object occurs within this collection.

ContainsKey(string)

Determines whether the NatsHeaders contains a specific key.

CopyTo(KeyValuePair<string, StringValues>[], int)

Copies the NatsHeaders elements to a one-dimensional Array instance at the specified index.

GetEnumerator()

Returns an enumerator that iterates through a collection.

Remove(KeyValuePair<string, StringValues>)

Removes the given item from the the collection.

Remove(string)

Removes the given header from the collection.

TryGetLastValue(string, out string?)

Retrieves a last value from the dictionary.

TryGetValue(string, out StringValues)

Retrieves a value from the dictionary.