Click or drag to resize

IIndexTKey, TValue Interface

Provides components by lookup operations via an index (key) type.

Namespace:  Autofac.Features.Indexed
Assembly:  Autofac (in Autofac.dll) Version: 4.9.1+831973f4d02fbc619921dfaa8ac0c536f60ae7a3
Syntax
public interface IIndex<in TKey, TValue>

Type Parameters

TKey
The type of the index.
TValue
The service provided by the indexed components.

The IIndexTKey, TValue type exposes the following members.

Properties
  NameDescription
Public propertyItem
Get the value associated with key.
Top
Methods
  NameDescription
Public methodTryGetValue
Get the value associated with key if any is available.
Top
Examples
Retrieving a value given a key:
IIndex<AccountType, IRenderer> accountRenderers = // ...
var renderer = accountRenderers[AccountType.User];
See Also