Method GetOptionalComponent
GetOptionalComponent(BuildContext, Type)
Get the value of an optional Type component from BuildSettings. The component Type must exist in the OptionalComponents list. If the component is not found in BuildSettings, a new instance of type Type is returned.
Declaration
public IBuildSettingsComponent GetOptionalComponent(BuildContext context, Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| BuildContext | context | The BuildContext used by the execution of this BuildStep. |
| Type | type | Type of the optional component. |
Returns
| Type | Description |
|---|---|
| IBuildSettingsComponent | The value of the optional component. |
GetOptionalComponent<T>(BuildContext)
Get the value of an optional T component from BuildSettings.
The component Type must exist in the OptionalComponents list.
If the component is not found in BuildSettings, a new instance of type T is returned.
Declaration
public T GetOptionalComponent<T>(BuildContext context) where T : IBuildSettingsComponent
Parameters
| Type | Name | Description |
|---|---|---|
| BuildContext | context | The BuildContext used by the execution of this BuildStep. |
Returns
| Type | Description |
|---|---|
| T | The value of the optional component. |
Type Parameters
| Name | Description |
|---|---|
| T | Type of the optional component. |