Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="5.8.0-preview-791" />

 BaseFluentConfigurator<TConfigurator>

public class BaseFluentConfigurator<TConfigurator> : ServiceRegistration where TConfigurator : BaseFluentConfigurator<TConfigurator>
Represents the base of the fluent registration api.
public Type ServiceType { get; }

The service type.

public TConfigurator AsImplementedTypes()

Registers the given service by all of it's implemented types.

public TConfigurator AsServiceAlso<TAdditionalService>()

Binds the currently configured registration to an additional service type.

public TConfigurator AsServiceAlso(Type serviceType)

Binds the currently configured registration to an additional service type.

public bool HasServiceType<TService>()

Determines whether the registration is mapped to the given service type.

public bool HasServiceType(Type serviceType)

Determines whether the registration is mapped to the given service type.

public TConfigurator InNamedScope(object scopeName)

Sets a scope name condition for the registration, it will be used only when a scope with the given name requests it.

public TConfigurator InScopeDefinedBy(Type type)

Sets a condition for the registration that it will be used only within the scope defined by the given type.

public TConfigurator InScopeDefinedBy<TScopeDefiner>()

Sets a condition for the registration that it will be used only within the scope defined by the given type.

public TConfigurator ReplaceExisting()

Tells the container that it should replace an existing registration with the current one, or add it if there is no existing found.

public TConfigurator ReplaceOnlyIfExists()

Tells the container that it should replace an existing registration with the current one, but only if there is an existing registration.

public TConfigurator When(Func<TypeInformation, bool> resolutionCondition)

Sets a generic condition for the registration.

public TConfigurator WhenDependantIs<TTarget>(object name = null)

Sets a parent target condition for the registration.

public TConfigurator WhenDependantIs(Type targetType, object name = null)

Sets a parent target condition for the registration.

public TConfigurator WhenHas<TAttribute>(object name = null) where TAttribute : Attribute

Sets an attribute condition for the registration.

public TConfigurator WhenHas(Type attributeType)

Sets an attribute condition for the registration.

public TConfigurator WhenInResolutionPathOf<TTarget>(object name = null)

Sets a resolution path condition for the registration. The service will be selected only in the resolution path of the given target. This means that only the direct and sub-dependencies of the target type will get the configured service.

public TConfigurator WhenInResolutionPathOf(Type targetType, object name = null)

Sets a resolution path condition for the registration. The service will be selected only in the resolution path of the given target. This means that only the direct and sub-dependencies of the target type will get the configured service.

public TConfigurator WhenResolutionPathHas<TAttribute>(object name = null) where TAttribute : Attribute

Sets a resolution path condition for the registration. The service will be selected only in the resolution path of the target that has the given attribute. This means that only the direct and sub-dependencies of the target type that has the given attribute will get the configured service.

public TConfigurator WhenResolutionPathHas(Type attributeType, object name = null)

Sets a resolution path condition for the registration. The service will be selected only in the resolution path of the target that has the given attribute. This means that only the direct and sub-dependencies of the target type that has the given attribute will get the configured service.

public TConfigurator WithAutoMemberInjection(AutoMemberInjectionRules rule = 4, Func<MemberInfo, bool> filter = null)

Enables auto member injection on the registration.

public TConfigurator WithConstructorByArguments(object[] arguments)

Sets the selected constructor.

public TConfigurator WithConstructorByArgumentTypes(Type[] argumentTypes)

Sets the selected constructor.

The constructor selection rule.

public TConfigurator WithDependencyBinding<TDependency>(object dependencyName = null)

Binds a constructor/method parameter or a property/field to a named registration, so the container will perform a named resolution on the bound dependency.

public TConfigurator WithDependencyBinding(Type dependencyType, object dependencyName = null)

Binds a constructor/method parameter or a property/field to a named registration, so the container will perform a named resolution on the bound dependency.

public TConfigurator WithDependencyBinding(string parameterName, object dependencyName = null)

Binds a constructor/method parameter or a property/field to a named registration, so the container will perform a named resolution on the bound dependency.

public TConfigurator WithInjectionParameter(string name, object value)

Sets injection parameters for the registration.

public TConfigurator WithInjectionParameters(KeyValuePair<string, object>[] injectionParameters)

Sets injection parameters for the registration.

public TConfigurator WithLifetime(LifetimeDescriptor lifetime)

Sets the lifetime of the registration.

public TConfigurator WithoutDisposalTracking()

Tells the container that it shouldn't track the resolved transient object for disposal.

public TConfigurator WithPerRequestLifetime()

Sets the lifetime to PerRequestLifetime. This lifetime will create a new instance between resolution requests. Within the request the same instance will be re-used.

public TConfigurator WithPerScopedRequestLifetime()

Sets the lifetime to PerScopedRequestLifetime. This lifetime will create a new instance between scoped services. This means that every scoped service will get a different instance but within their dependency tree it will behave as a singleton.

public TConfigurator WithScopedLifetime()

Sets scoped lifetime for the registration.

public TConfigurator WithSingletonLifetime()

Sets singleton lifetime for the registration.

public TConfigurator WithTransientLifetime()

Sets transient lifetime for the registration.