Struct CoreRegistration
Handle to a registered IInitializablePackage. Provides a fluent interface to define its components dependencies and provisions.
Namespace: Unity.Services.Core.Internal
Syntax
public readonly struct CoreRegistration
Methods
DependsOn<T>()
Declare the given component type a dependency of the handled package.
Declaration
public readonly CoreRegistration DependsOn<T>()
where T : IServiceComponent
Returns
Type | Description |
---|---|
CoreRegistration | Return this registration. |
Type Parameters
Name | Description |
---|---|
T | The type of IServiceComponent to declare as a dependency for the handled package. |
OptionallyDependsOn<T>()
Declare the given component type an optional dependency of the handled package.
Declaration
public readonly CoreRegistration OptionallyDependsOn<T>()
where T : IServiceComponent
Returns
Type | Description |
---|---|
CoreRegistration | Return this registration. |
Type Parameters
Name | Description |
---|---|
T | The type of IServiceComponent to declare as an optional dependency for the handled package. |
ProvidesComponent<T>()
Declare the given component type a provided component by the handled package.
Declaration
public readonly CoreRegistration ProvidesComponent<T>()
where T : IServiceComponent
Returns
Type | Description |
---|---|
CoreRegistration | Return this registration. |
Type Parameters
Name | Description |
---|---|
T | The type of IServiceComponent to declare provided by the handled package. |