Interface IServiceRepository
Custom service registry. Modeled after LightInject.IServiceRegistry. If designed today, we would remove this interface with the LightInject version. Perhaps in a future version we will do this as a breaking change. For the default implementation, most calls pass through directly to the underlying LightInject equivalent. For those operations that require a LightInject.ILifetime, a LightInject.PerContainerLifetime is used.
Namespace: ExtendedXmlSerializer.ExtensionModel
Assembly: ExtendedXmlSerializer.dll
Syntax
public interface IServiceRepository
Properties
AvailableServices
Declaration
IEnumerable<TypeInfo> AvailableServices { get; }
Property Value
System.Collections.Generic.IEnumerable<System.Reflection.TypeInfo>
|
See Also
Methods
Decorate(Type, Type)
Declaration
IServiceRepository Decorate(Type serviceType, Type decoratorType)
Parameters
System.Type
serviceType
|
System.Type
decoratorType
|
Returns
IServiceRepository
|
See Also
Decorate<TService>(Func<IServiceProvider, TService, TService>)
Declaration
IServiceRepository Decorate<TService>(Func<IServiceProvider, TService, TService> factory)
Parameters
System.Func<IServiceProvider, TService, TService>
factory
|
Returns
IServiceRepository
|
Type Parameters
TService
|
See Also
Decorate<TService, TDecorator>()
Declaration
IServiceRepository Decorate<TService, TDecorator>()
where TDecorator : TService
Returns
IServiceRepository
|
Type Parameters
TService
|
TDecorator
|
See Also
Register(Type)
Declaration
IServiceRepository Register(Type serviceType)
Parameters
System.Type
serviceType
|
Returns
IServiceRepository
|
See Also
Register(Type, Type)
Declaration
IServiceRepository Register(Type serviceType, Type implementingType)
Parameters
System.Type
serviceType
|
System.Type
implementingType
|
Returns
IServiceRepository
|
See Also
Register(Type, Type, String)
Declaration
IServiceRepository Register(Type serviceType, Type implementingType, string serviceName)
Parameters
System.Type
serviceType
|
System.Type
implementingType
|
System.String
serviceName
|
Returns
IServiceRepository
|
See Also
Register<TService>()
Declaration
IServiceRepository Register<TService>()
Returns
IServiceRepository
|
Type Parameters
TService
|
See Also
Register<TService>(Func<IServiceProvider, TService>)
Declaration
IServiceRepository Register<TService>(Func<IServiceProvider, TService> factory)
Parameters
System.Func<IServiceProvider, TService>
factory
|
Returns
IServiceRepository
|
Type Parameters
TService
|
Remarks
Uses a LightInject.PerContainerLifetime instance for the lifetime.
See Also
Register<TService>(Func<IServiceProvider, TService>, String)
Declaration
IServiceRepository Register<TService>(Func<IServiceProvider, TService> factory, string serviceName)
Parameters
System.Func<IServiceProvider, TService>
factory
|
System.String
serviceName
|
Returns
IServiceRepository
|
Type Parameters
TService
|
See Also
Register<TService, TImplementation>()
Declaration
IServiceRepository Register<TService, TImplementation>()
where TImplementation : TService
Returns
IServiceRepository
|
Type Parameters
TService
|
TImplementation
|
See Also
Register<T, TService>(Func<IServiceProvider, T, TService>)
Declaration
IServiceRepository Register<T, TService>(Func<IServiceProvider, T, TService> factory)
Parameters
System.Func<IServiceProvider, T, TService>
factory
|
Returns
IServiceRepository
|
Type Parameters
T
|
TService
|
See Also
Register<T, TService>(Func<IServiceProvider, T, TService>, String)
Declaration
IServiceRepository Register<T, TService>(Func<IServiceProvider, T, TService> factory, string serviceName)
Parameters
System.Func<IServiceProvider, T, TService>
factory
|
System.String
serviceName
|
Returns
IServiceRepository
|
Type Parameters
T
|
TService
|
See Also
Register<TService, TImplementation>(String)
Declaration
IServiceRepository Register<TService, TImplementation>(string serviceName)
where TImplementation : TService
Parameters
System.String
serviceName
|
Returns
IServiceRepository
|
Type Parameters
TService
|
TImplementation
|
See Also
Register<T1, T2, TService>(Func<IServiceProvider, T1, T2, TService>)
Declaration
IServiceRepository Register<T1, T2, TService>(Func<IServiceProvider, T1, T2, TService> factory)
Parameters
System.Func<IServiceProvider, T1, T2, TService>
factory
|
Returns
IServiceRepository
|
Type Parameters
T1
|
T2
|
TService
|
See Also
Register<T1, T2, TService>(Func<IServiceProvider, T1, T2, TService>, String)
Declaration
IServiceRepository Register<T1, T2, TService>(Func<IServiceProvider, T1, T2, TService> factory, string serviceName)
Parameters
System.Func<IServiceProvider, T1, T2, TService>
factory
|
System.String
serviceName
|
Returns
IServiceRepository
|
Type Parameters
T1
|
T2
|
TService
|
See Also
Register<T1, T2, T3, TService>(Func<IServiceProvider, T1, T2, T3, TService>)
Declaration
IServiceRepository Register<T1, T2, T3, TService>(Func<IServiceProvider, T1, T2, T3, TService> factory)
Parameters
System.Func<IServiceProvider, T1, T2, T3, TService>
factory
|
Returns
IServiceRepository
|
Type Parameters
T1
|
T2
|
T3
|
TService
|
See Also
Register<T1, T2, T3, TService>(Func<IServiceProvider, T1, T2, T3, TService>, String)
Declaration
IServiceRepository Register<T1, T2, T3, TService>(Func<IServiceProvider, T1, T2, T3, TService> factory, string serviceName)
Parameters
System.Func<IServiceProvider, T1, T2, T3, TService>
factory
|
System.String
serviceName
|
Returns
IServiceRepository
|
Type Parameters
T1
|
T2
|
T3
|
TService
|
See Also
Register<T1, T2, T3, T4, TService>(Func<IServiceProvider, T1, T2, T3, T4, TService>)
Declaration
IServiceRepository Register<T1, T2, T3, T4, TService>(Func<IServiceProvider, T1, T2, T3, T4, TService> factory)
Parameters
System.Func<IServiceProvider, T1, T2, T3, T4, TService>
factory
|
Returns
IServiceRepository
|
Type Parameters
T1
|
T2
|
T3
|
T4
|
TService
|
See Also
Register<T1, T2, T3, T4, TService>(Func<IServiceProvider, T1, T2, T3, T4, TService>, String)
Declaration
IServiceRepository Register<T1, T2, T3, T4, TService>(Func<IServiceProvider, T1, T2, T3, T4, TService> factory, string serviceName)
Parameters
System.Func<IServiceProvider, T1, T2, T3, T4, TService>
factory
|
System.String
serviceName
|
Returns
IServiceRepository
|
Type Parameters
T1
|
T2
|
T3
|
T4
|
TService
|
See Also
RegisterConstructorDependency<TDependency>(Func<IServiceProvider, ParameterInfo, TDependency>)
Declaration
IServiceRepository RegisterConstructorDependency<TDependency>(Func<IServiceProvider, ParameterInfo, TDependency> factory)
Parameters
System.Func<IServiceProvider, System.Reflection.ParameterInfo, TDependency>
factory
|
Returns
IServiceRepository
|
Type Parameters
TDependency
|
See Also
RegisterConstructorDependency<TDependency>(Func<IServiceProvider, ParameterInfo, Object[], TDependency>)
Declaration
IServiceRepository RegisterConstructorDependency<TDependency>(Func<IServiceProvider, ParameterInfo, object[], TDependency> factory)
Parameters
System.Func<IServiceProvider, System.Reflection.ParameterInfo, System.Object[], TDependency>
factory
|
Returns
IServiceRepository
|
Type Parameters
TDependency
|
See Also
RegisterFallback(Func<Type, Boolean>, Func<Type, Object>)
Declaration
IServiceRepository RegisterFallback(Func<Type, bool> predicate, Func<Type, object> factory)
Parameters
System.Func<System.Type, System.Boolean>
predicate
|
System.Func<System.Type, System.Object>
factory
|
Returns
IServiceRepository
|
See Also
RegisterInstance(Type, Object)
Declaration
IServiceRepository RegisterInstance(Type serviceType, object instance)
Parameters
System.Type
serviceType
|
System.Object
instance
|
Returns
IServiceRepository
|
See Also
RegisterInstance(Type, Object, String)
Declaration
IServiceRepository RegisterInstance(Type serviceType, object instance, string serviceName)
Parameters
System.Type
serviceType
|
System.Object
instance
|
System.String
serviceName
|
Returns
IServiceRepository
|
See Also
RegisterInstance<TService>(TService)
Declaration
IServiceRepository RegisterInstance<TService>(TService instance)
Parameters
TService
instance
|
Returns
IServiceRepository
|
Type Parameters
TService
|
See Also
RegisterInstance<TService>(TService, String)
Declaration
IServiceRepository RegisterInstance<TService>(TService instance, string serviceName)
Parameters
TService
instance
|
System.String
serviceName
|
Returns
IServiceRepository
|
Type Parameters
TService
|