/// <summary> /// Create a new instance of the <see cref="DecoratingTargetContainer"/> class to decorate /// instances of <paramref name="decoratedType"/> with instances produced by the <paramref name="decoratorTarget"/>. /// </summary> /// <param name="root">Required. The root <see cref="ITargetContainer"/> to which this decorating /// container will be registered.</param> /// <param name="decoratorTarget"></param> /// <param name="decoratedType"></param> public DecoratingTargetContainer(IRootTargetContainer root, ITarget decoratorTarget, Type decoratedType) : this(root, decoratedType) { if (decoratorTarget == null) { throw new ArgumentNullException(nameof(decoratorTarget)); } DecoratorFactory = (ta, ty) => decoratorTarget; }
/// <summary> /// /// </summary> /// <param name="root"></param> /// <param name="factory"></param> /// <param name="decoratedType"></param> internal DecoratingTargetContainer(IRootTargetContainer root, DecoratingTargetFactory factory, Type decoratedType) : this(root, decoratedType) { DecoratorFactory = factory ?? throw new ArgumentNullException(nameof(factory)); }