Class KeyedServiceFactory<TConfig, TAttr, TService>
- Namespace
- JobFlow.Core.Infrastructure.Factories
- Assembly
- JobFlow.Core.dll
public class KeyedServiceFactory<TConfig, TAttr, TService> : IKeyedServiceFactory<TService>, IKeyedServiceFactory<TAttr, TService> where TConfig : KeyedServiceConfiguration<TAttr, TService> where TAttr : ServiceKeyAttribute
Type Parameters
TConfig
TAttr
TService
- Inheritance
-
KeyedServiceFactory<TConfig, TAttr, TService>
- Implements
-
IKeyedServiceFactory<TService>IKeyedServiceFactory<TAttr, TService>
- Derived
- Extension Methods
Constructors
KeyedServiceFactory(IOptions<TConfig>, IServiceProvider)
public KeyedServiceFactory(IOptions<TConfig> options, IServiceProvider serviceResolver)
Parameters
options
IOptions<TConfig>serviceResolver
IServiceProvider
Methods
GetDescriptor(string)
public virtual KeyedServiceDescriptor<TAttr> GetDescriptor(string key)
Parameters
key
string
Returns
- KeyedServiceDescriptor<TAttr>
Resolve(KeyedServiceDescriptor<TAttr>)
protected virtual TService Resolve(KeyedServiceDescriptor<TAttr> data)
Parameters
data
KeyedServiceDescriptor<TAttr>
Returns
- TService
Resolve(string)
public virtual KeyedServiceData<TAttr, TService> Resolve(string key)
Parameters
key
string
Returns
- KeyedServiceData<TAttr, TService>