Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.6.3-preview-638" />

 BaseFluentConfigurator<TConfigurator>

public class BaseFluentConfigurator<TConfigurator> : RegistrationConfiguration where TConfigurator : BaseFluentConfigurator<TConfigurator>
Represents the base of the fluent registration api.
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 TConfigurator InjectMember(string memberName, object dependencyName = null)

Set a member (property / field) with the given name as a dependency that should be filled by the container.

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>()

Sets a parent target condition for the registration.

public TConfigurator WhenDependantIs(Type targetType)

Sets a parent target condition for the registration.

public TConfigurator WhenHas<TAttribute>() where TAttribute : Attribute

Sets an attribute condition for the registration.

public TConfigurator WhenHas(Type attributeType)

Sets an attribute condition for the registration.

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 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.