protected DefaultPropertyBuildContext(ILookup innerLookup, IContextLookup contextLookup, string prefix, IPropertyMap map, GetInstanceDelegate <TSubject> getInstance, SetInstanceDelegate <TSubject> setInstance, AssignmentPolicy policy) { this.innerLookup = innerLookup; this.map = map; this.prefix = prefix; this.getInstance = getInstance; this.setInstance = setInstance; this.policy = policy; this.contextLookup = contextLookup; }
public IPropertyBuildContext <TInnerChild> CreateChildContext <TInnerChild>(string name, GetInstanceDelegate <TInnerChild> getHandler, SetInstanceDelegate <TInnerChild> setHandler, AssignmentPolicy policy) where TInnerChild : class { return(new OuterWrappingBuildContext <T1, T2, TInnerChild>(wrapper, childContext.CreateChildContext(name, getHandler, setHandler, policy))); }
/// <summary> /// Recursively applies the cloning logic to the registered setters. /// </summary> public IPropertyBuildContext <TChild> CreateChildContext <TChild>(string name, GetInstanceDelegate <TChild> getHandler, SetInstanceDelegate <TChild> setHandler, AssignmentPolicy policy) where TChild : class { if (parent.useClone) { return(new OuterWrappingBuildContext <T1, T2, TChild>(this, context.CreateChildContext(name, getHandler, setHandler, policy))); } else { return(context.CreateChildContext(name, getHandler, setHandler, policy)); } }
/// <summary> /// Creates a new instance using the provided policy. /// </summary> /// <param name="policy"></param> public AssignmentPolicyAttribute(AssignmentPolicy policy) { this.policy = policy; }
internal DecoratedBuildContext(ILookup lookup, IContextLookup innerLookup, string prefix, IPropertyMap map, GetInstanceDelegate <TInnerSubject> getHandler, SetInstanceDelegate <TInnerSubject> setHandler, AssignmentPolicy policy) : base(lookup, innerLookup, prefix, map, getHandler, setHandler, policy) { }
public IPropertyBuildContext <TChild> CreateChildContext <TChild>(string name, GetInstanceDelegate <TChild> getHandler, SetInstanceDelegate <TChild> setHandler, AssignmentPolicy policy) where TChild : class { return(new DecoratedBuildContext <TChild>(innerLookup, contextLookup, DefaultOptionBuilderContext <object> .CreatePrefix(this.prefix, name), map, getHandler, setHandler, policy)); }