ServiceResolver<TService> class
namespace: Serenity.Extensions.DependencyInjection assembly: Serenity.Net.Core
A generic version of IServiceProvider which resolves a service on demand.
public class ServiceResolver<TService> : IServiceResolver<TService>
| parameter | description |
|---|---|
| TService | The type of the service to resolve. |
| serviceProvider | The service provider. |
Public Members
| name | description |
|---|---|
| ServiceResolver(…) | A generic version of IServiceProvider which resolves a service on demand. |
| Resolve() | Resolves TService using the service provider. If the service was registered as transient, this method acts like a factory. |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | Throws when the service provider is null. |
Remarks
Initializes a new instance.
See Also
- interface IServiceResolver<TService>
- Source: ServiceResolver.cs