Class TypeRegistrar
Implements
ITypeRegistrar
Namespace: Coree.NETStandard
Assembly: Coree.NETStandard.dll
Syntax
public sealed class TypeRegistrar : ITypeRegistrar
Constructors
| Edit this page View SourceTypeRegistrar(IServiceCollection)
Declaration
public TypeRegistrar(IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services |
Methods
| Edit this page View SourceBuild()
Builds the type resolver representing the registrations specified in the current instance.
Declaration
public ITypeResolver Build()
Returns
| Type | Description |
|---|---|
| ITypeResolver | A type resolver. |
Register(Type, Type)
Registers the specified service.
Declaration
public void Register(Type service, Type implementation)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | service | The service. |
| Type | implementation | The implementation. |
RegisterInstance(Type, object)
Registers the specified instance.
Declaration
public void RegisterInstance(Type service, object implementation)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | service | The service. |
| object | implementation | The implementation. |
RegisterLazy(Type, Func<object>)
Registers the specified instance lazily.
Declaration
public void RegisterLazy(Type service, Func<object> func)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | service | The service. |
| Func<object> | func |
Implements
Spectre.Console.Cli.ITypeRegistrar