IComponentManager Interface

Definition

Custom composition manager that allows mapping between Guid and components that implement IIdentifiedComponent. Used for generators, post actions, different implementations of installers, providers...

C#
public interface IComponentManager

Methods

AddComponent(Type, IIdentifiedComponent)

Adds component to manager, which can be looked up later via TryGetComponent<T>(Guid, T) or OfType<T>().

OfType<T>()

Returns all components of specified type.

Register(Type)
Obsolete.

Adds component to manager, which can be looked up later via TryGetComponent<T>(Guid, T) or OfType<T>().

RegisterMany(IEnumerable<Type>)
Obsolete.

Adds list of components to manager, which can be looked up later via TryGetComponent<T>(Guid, T) or OfType<T>().

TryGetComponent<T>(Guid, T)

Gets specific component via Guid. E.g: to lookup implementation of "Restore NuGet packages" post action, pass in {210D431B-A78B-4D2F-B762-4ED3E3EA9025} Guid.

Applies to

Proizvod Verzije
Template Engine 6.0.100, 7.0.100