Method
AddInstance
func AddInstance(service: TypeInfo, instance: object) -> Result<void, ServiceError>
Declaring type: DefaultServiceCollection
Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.dll
Source file: Services.rvn
Implements ServiceCollection.AddInstance
Registers a caller-owned unkeyed instance.
Parameters
| Name | Type | Description |
|---|---|---|
service |
TypeInfo | |
instance |
Object |
Return value
Result<void, ServiceError>