Method GetComponentOrDefault
GetComponentOrDefault(Type)
Get the value of a Type component if found. Otherwise an instance created using TypeConstruction utility. The container is not modified.
Declaration
public TComponent GetComponentOrDefault(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | Type of the component. |
Returns
Type | Description |
---|---|
TComponent | The component value. |
GetComponentOrDefault<T>()
Get the value of a T
component if found.
Otherwise an instance created using TypeConstruction utility.
The container is not modified.
Declaration
public T GetComponentOrDefault<T>() where T : TComponent
Returns
Type | Description |
---|---|
T | The component value. |
Type Parameters
Name | Description |
---|---|
T | Type of the component. |