Table of Contents

Class ComponentCollector<T>

Namespace
Cryville.EEW.ComponentModel
Assembly
Cryville.EEW.dll
Represents a component collector.
public abstract class ComponentCollector<T> : IComponentCollector, INamedComponent

Type Parameters

T
Inheritance
ComponentCollector<T>
Implements
Inherited Members

Constructors

ComponentCollector()

Creates an instance of the ComponentCollector<T> class.
protected ComponentCollector()

Properties

Builders

Collected builders.
[ImportMany(AllowRecomposition = true)]
public IEnumerable<IBuilder<T>> Builders { get; }

Property Value

IEnumerable<IBuilder<T>>

Components

Collected configured components.
public IReadOnlyList<T> Components { get; }

Property Value

IReadOnlyList<T>

IsAutomatic

Whether the collector collects singleton components automatically.
public abstract bool IsAutomatic { get; }

Property Value

bool

Methods

GetName(ref CultureInfo?)

Gets a human-readable name of the component.
public abstract string? GetName(ref CultureInfo? culture)

Parameters

culture CultureInfo
The preferred culture of the name. When the method returns, set to the actual culture of the name.

Returns

string

Remarks

It is recommended to get the name from a LocalizedResource.

OnComponentsChange(object?, NotifyCollectionChangedEventArgs)

Called when the list of components is changed.
protected virtual void OnComponentsChange(object? sender, NotifyCollectionChangedEventArgs e)

Parameters

sender object
The object that raised the event.
e NotifyCollectionChangedEventArgs
Information about the event.

Events

BuildersChanged

Raised when the list of builders is changed.
public event EventHandler? BuildersChanged

Event Type

EventHandler

ComponentsChange

Raised when the list of components is changed.
public event NotifyCollectionChangedEventHandler? ComponentsChange

Event Type

NotifyCollectionChangedEventHandler