Method
GetService
func GetService<T>() -> Result<Optional<T>, ServiceError>
Declaring type: ServiceProviderExtensions
Module: Neo.DependencyInjection
Assembly: Neo.DependencyInjection.Abstractions.dll
Extension from ServiceProviderExtensions.GetService
Typed form of GetService; preserves activation errors and lifetime behavior.
Parameters
| Name | Type | Description |
|---|---|---|
self |
ServiceProvider |
Return value
Result<Optional<T>, ServiceError>