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