Table of Contents

Interface IComponentContainer<TComponentType>

Namespace
Uncreated.Warfare.Util.Containers
Assembly
Uncreated.Warfare.dll

A container for neatly separating and storing sub components of type TComponentType.

public interface IComponentContainer<in TComponentType> : IComponentContainer where TComponentType : notnull

Type Parameters

TComponentType
Inherited Members

Methods

ComponentOrNull<T>()

Get the given component type from a list of components.

[Pure]
T? ComponentOrNull<T>() where T : class, TComponentType

Returns

T

Type Parameters

T

Component<T>()

Get the given component type from a list of components.

[Pure]
T Component<T>() where T : class, TComponentType

Returns

T

Type Parameters

T

Remarks

Always returns a value or throws an exception.

Exceptions

ComponentNotFoundException

Component not found.