RegistrationContext
Represents the state of a scoped registration.
using Stashbox.Configuration;
using Stashbox.Lifetime;
using Stashbox.Resolution;
using Stashbox.Utils.Data;
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Stashbox.Registration
{
public class RegistrationContext
{
internal static readonly RegistrationContext Empty = new RegistrationContext();
public bool ReplaceExistingRegistration { get; set; }
public IEnumerable<Type> AdditionalServiceTypes { get; set; }
public object Name { get; set; }
public Delegate ContainerFactory { get; set; }
public Delegate SingleFactory { get; set; }
public IEnumerable<KeyValuePair<string, object>> 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 Delegate Finalizer { get; set; }
public Delegate 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 bool IsWireUp { get; set; }
public bool IsFactoryDelegateACompiledLambda { get; set; }
public Func<IEnumerable<ConstructorInfo>, IEnumerable<ConstructorInfo>> ConstructorSelectionRule { get; set; }
public Func<MemberInfo, bool> AutoMemberInjectionFilter { get; set; }
internal RegistrationContext()
{
AttributeConditions = new ExpandableArray<Type>();
AdditionalServiceTypes = new ExpandableArray<Type>();
InjectionParameters = new ExpandableArray<KeyValuePair<string, object>>();
InjectionMemberNames = new Dictionary<string, object>();
DependencyBindings = new Dictionary<object, object>();
}
}
}