Class ProducibleServiceEntry

Reperesents the base class of producible servce entries.

Inheritance
System.Object
AbstractServiceEntry
ProducibleServiceEntry
Implements
IServiceId
Inherited Members
AbstractServiceEntry.FCreateInstance
AbstractServiceEntry.UpdateStateInternal(ServiceEntryStates)
AbstractServiceEntry.Specialize(Type[])
AbstractServiceEntry.ToString()
AbstractServiceEntry.ToString(Boolean)
AbstractServiceEntry.Type
AbstractServiceEntry.Key
AbstractServiceEntry.Implementation
AbstractServiceEntry.Factory
AbstractServiceEntry.Lifetime
AbstractServiceEntry.ExplicitArgs
AbstractServiceEntry.Options
AbstractServiceEntry.State
AbstractServiceEntry.AssignedSlot
AbstractServiceEntry.CreateInstance
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
AbstractServiceEntry.Decorators

Features

Features related to this entry.

Declaration
public override ServiceEntryFeatures Features { get; }
Property Value
Type Description
ServiceEntryFeatures
Overrides
AbstractServiceEntry.Features

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
AbstractServiceEntry.Build(IBuildContext, IReadOnlyList<IFactoryVisitor>)

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
AbstractServiceEntry.CreateLifetimeManager(Expression, ParameterExpression, ParameterExpression)
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
AbstractServiceEntry.Decorate(Expression<DecoratorDelegate>)

UpdateState(ServiceEntryStates)

If supported, updates the State of this entry.

Declaration
public sealed override void UpdateState(ServiceEntryStates newState)
Parameters
Type Name Description
ServiceEntryStates newState
Overrides
AbstractServiceEntry.UpdateState(ServiceEntryStates)

Implements

IServiceId

Extension Methods

ServiceEntryAdvancedExtensions.IsInstance(AbstractServiceEntry)
ServiceEntryExtensions.IsService(AbstractServiceEntry)
ServiceEntryExtensions.IsFactory(AbstractServiceEntry)
In This Article
Back to top Generated by DocFX