Method
TryAdd
func TryAdd(descriptor: ServiceDescriptor) -> Result<bool, ServiceError>
Declaring type: DefaultServiceCollection
Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.dll
Source file: Services.rvn
Implements ServiceCollection.TryAdd
Preserves the first matching registration regardless of lifetime or activation source.
Parameters
| Name | Type | Description |
|---|---|---|
descriptor |
ServiceDescriptor |