Table of Contents

Class RequestContextFeature

Namespace
IceRpc.Features
Assembly
IceRpc.dll

Default implementation of IRequestContextFeature.

public sealed class RequestContextFeature : IRequestContextFeature, IEnumerable<KeyValuePair<string, string>>, IEnumerable
Inheritance
RequestContextFeature
Implements
Inherited Members

Remarks

This class implements IEnumerable, Add(string, string) and the indexer operator to allow you to use a collection initializer.

Constructors

RequestContextFeature()

Constructs an empty writeable request context feature.

public RequestContextFeature()

RequestContextFeature(IDictionary<string, string>)

Constructs a request context feature with the specified dictionary.

public RequestContextFeature(IDictionary<string, string> dictionary)

Parameters

dictionary IDictionary<string, string>

The dictionary that the new feature will hold.

Properties

this[string]

Gets or sets an entry in Value.

public string this[string key] { get; set; }

Parameters

key string

The key.

Property Value

string

The value.

Value

Gets the value of this feature.

public IDictionary<string, string> Value { get; }

Property Value

IDictionary<string, string>

The request context.

Methods

Add(string, string)

Adds a new entry to Value.

public void Add(string key, string value)

Parameters

key string

The key of the new entry.

value string

The value of the new entry.

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<KeyValuePair<string, string>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<string, string>>

An enumerator that can be used to iterate through the collection.