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
IsAutomatic
Whether the collector collects singleton components automatically.
public abstract bool IsAutomatic { get; }
Property Value
Methods
GetName(ref CultureInfo?)
Gets a human-readable name of the component.
public abstract string? GetName(ref CultureInfo? culture)
Parameters
cultureCultureInfo- The preferred culture of the name. When the method returns, set to the actual culture of the name.
Returns
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
senderobject- The object that raised the event.
eNotifyCollectionChangedEventArgs- Information about the event.
Events
BuildersChanged
Raised when the list of builders is changed.
public event EventHandler? BuildersChanged
Event Type
ComponentsChange
Raised when the list of components is changed.
public event NotifyCollectionChangedEventHandler? ComponentsChange