Table of Contents

Interface IAllKeyedServices<TKey, TService>

Namespace
ToSic.Sys.DI
Assembly
ToSic.Sys.Core.dll

Generic interface to get all keyed services by name.

[InternalApi_DoNotUse_MayChangeWithoutNotice("WIP v22.02")]
public interface IAllKeyedServices<TKey, TService> : IEnumerable<KeyValuePair<TKey, TService>>, IEnumerable where TService : class

Type Parameters

TKey

Key type, usually string

TService

Implementation type

Inherited Members

Remarks

The services will only get instantiated if the enumerable is enumerated, so this is a lazy way to get all services.

To only get the keys, use the Keys property, which will not instantiate any services.

Properties

Keys

Get a list of keys, without instantiating any services.

IEnumerable<TKey> Keys { get; }

Property Value

IEnumerable<TKey>