Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="2.9.0-preview-518" />

 ServiceRegistration

Represents a service registration.

Holds the constructors of the service.

public bool HasCondition { get; }

True if the registration contains any condition, otherwise false.

public bool HasName { get; }

True if the registration has a name set.

public bool HasScopeName { get; }

True if the registration is restricted to a named scope.

public Type ImplementationType { get; }

The implementation type.

Holds the injection member of the service.

Holds the injection methods of the service.

public bool IsDecorator { get; }

True if the registration is a decorator.

public bool IsResolvableByUnnamedRequest { get; }

True if the registration can used by an unnamed resolution request.

The registration context.

public object RegistrationId { get; }

The registration id.

public int RegistrationNumber { get; }

The registration number.

Holds the information about the constructor, selected by the user at configuration time.

public bool ShouldHandleDisposal { get; }

True if the registration contains a disposable service which should be tracked.

public bool CanInjectIntoNamedScope(ISet<object> scopeNames)

Checks that the registration can be injected into a named scope.

public IServiceRegistration Clone(Type implementationType, IObjectBuilder objectBuilder)

Clones the registration with new underlying type.

public Expression GetExpression(IContainerContext containerContext, ResolutionContext resolutionContext, Type resolveType)

Creates an expression for creating the resolved instance.

Checks whether the registration can be used for a current resolution.

public bool ValidateGenericConstraints(Type type)

Validates that the given type's generic argument fulfills the generic constraint or not