Stashbox by Peter Csajtai

<PackageReference Include="Stashbox" Version="3.1.0-preview-537" />

 RegistrationContext

public class RegistrationContext
Represents the state of a scoped registration.
using Stashbox.Configuration; using Stashbox.Entity; using Stashbox.Lifetime; using Stashbox.Utils; using System; using System.Collections.Generic; using System.Reflection; namespace Stashbox.Registration { public class RegistrationContext { public static readonly RegistrationContext Empty = New(); public bool ReplaceExistingRegistration { get; set; } public bool FactoryCacheDisabled { get; set; } public IEnumerable<Type> AdditionalServiceTypes { get; set; } public object Name { get; set; } public Func<IDependencyResolver, object> ContainerFactory { get; set; } public Func<object> SingleFactory { get; set; } public IEnumerable<InjectionParameter> InjectionParameters { get; set; } public ConstructorInfo SelectedConstructor { get; set; } public object[] ConstructorArguments { get; set; } public LifetimeDescriptor Lifetime { get; set; } public Type TargetTypeCondition { get; set; } public Func<TypeInformation, bool> ResolutionCondition { get; set; } public IEnumerable<Type> AttributeConditions { get; set; } public Dictionary<string, object> InjectionMemberNames { get; set; } public Dictionary<object, object> DependencyBindings { get; set; } public object ExistingInstance { get; set; } public object Finalizer { get; set; } public object Initializer { get; set; } public Rules.AutoMemberInjectionRules AutoMemberInjectionRule { get; set; } public bool AutoMemberInjectionEnabled { get; set; } public bool IsLifetimeExternallyOwned { get; set; } public Delegate FuncDelegate { get; set; } public object DefinedScopeName { get; set; } public object NamedScopeRestrictionIdentifier { get; set; } public bool IsWireUp { get; set; } public bool IsFactoryDelegateACompiledLambda { get; set; } public Func<IEnumerable<ConstructorInfo>, IEnumerable<ConstructorInfo>> ConstructorSelectionRule { get; set; } public Func<MemberInfo, bool> MemberInjectionFilter { get; set; } public static RegistrationContext New() { return new RegistrationContext(); } public RegistrationContext() { AttributeConditions = new ExpandableArray<Type>(); AdditionalServiceTypes = new ExpandableArray<Type>(); InjectionParameters = new ExpandableArray<InjectionParameter>(); InjectionMemberNames = new Dictionary<string, object>(); DependencyBindings = new Dictionary<object, object>(); } } }