Class ProducibleServiceEntry
Reperesents the base class of producible servce entries.
Implements
Inherited Members
Namespace: Solti.Utils.DI.Internals
Assembly: Solti.Utils.DI.dll
Syntax
public abstract class ProducibleServiceEntry : AbstractServiceEntry, IServiceId
Constructors
ProducibleServiceEntry(Type, Object, Expression<FactoryDelegate>, ServiceOptions)
Creartes a new ProducibleServiceEntry instance.
Declaration
protected ProducibleServiceEntry(Type type, object key, Expression<FactoryDelegate> factory, ServiceOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | |
System.Object | key | |
System.Linq.Expressions.Expression<FactoryDelegate> | factory | |
ServiceOptions | options |
ProducibleServiceEntry(Type, Object, Type, ServiceOptions)
Creartes a new ProducibleServiceEntry instance.
Declaration
protected ProducibleServiceEntry(Type type, object key, Type implementation, ServiceOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | |
System.Object | key | |
System.Type | implementation | |
ServiceOptions | options |
ProducibleServiceEntry(Type, Object, Type, Object, ServiceOptions)
Creartes a new ProducibleServiceEntry instance.
Declaration
protected ProducibleServiceEntry(Type type, object key, Type implementation, object explicitArgs, ServiceOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | |
System.Object | key | |
System.Type | implementation | |
System.Object | explicitArgs | |
ServiceOptions | options |
Properties
Decorators
Bound decorators.
Declaration
public sealed override IReadOnlyList<Expression<DecoratorDelegate>> Decorators { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.Expression<DecoratorDelegate>> |
Overrides
Features
Features related to this entry.
Declaration
public override ServiceEntryFeatures Features { get; }
Property Value
Type | Description |
---|---|
ServiceEntryFeatures |
Overrides
Methods
Build(IBuildContext, IReadOnlyList<IFactoryVisitor>)
Builds this entry applying the provided factory visitors
.
Declaration
public override void Build(IBuildContext context, IReadOnlyList<IFactoryVisitor> visitors)
Parameters
Type | Name | Description |
---|---|---|
IBuildContext | context | |
System.Collections.Generic.IReadOnlyList<IFactoryVisitor> | visitors |
Overrides
CreateLifetimeManager(Expression, ParameterExpression, ParameterExpression)
Creates the lifetime manager expression.
Declaration
public override Expression CreateLifetimeManager(Expression getService, ParameterExpression scope, ParameterExpression disposable)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | getService | |
System.Linq.Expressions.ParameterExpression | scope | |
System.Linq.Expressions.ParameterExpression | disposable |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression |
Overrides
Remarks
Lifetime manager instructs the system how to dispose a particular service instance. In most of cases it's just a simple cast:
disposable = getService() as IDisposable
Decorate(Expression<DecoratorDelegate>)
If implemented, alters the service instantiation process in order to wrap the original service into a proxy.
Declaration
public override void Decorate(Expression<DecoratorDelegate> decorator)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<DecoratorDelegate> | decorator |
Overrides
UpdateState(ServiceEntryStates)
If supported, updates the State of this entry.
Declaration
public sealed override void UpdateState(ServiceEntryStates newState)
Parameters
Type | Name | Description |
---|---|---|
ServiceEntryStates | newState |