/// <summary>
        /// Initializes a new instance of the <see cref="CreateTargetImplConvertTargetHelper{TSource,TTarget,TTargetImpl,TReverseRelation,TConvertIntention}" /> class.
        /// </summary>
        public CreateTargetImplConvertTargetHelper(
            IInstanceCreator <TTarget, TTargetImpl> instanceCreator,
            IConvert <TSource, TTarget, TConvertIntention> convert)
        {
            instanceCreator.NotNull(nameof(instanceCreator));
            convert.NotNull(nameof(convert));

            this.instanceCreator = instanceCreator;
            this.convert         = convert;
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateConvertStrategy{TSource, TConcreteSource, TTarget, TConcreteTarget, TConcreteTargetImpl, TIntention}"/> class.
        /// </summary>
        public CreateConvertStrategy(
            IInstanceCreator <TConcreteTarget, TConcreteTargetImpl> creator,
            IConvert <TConcreteSource, TConcreteTarget, TIntention> converter)
        {
            creator.NotNull(nameof(creator));
            converter.NotNull(nameof(converter));

            this.creator   = creator;
            this.converter = converter;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="GenericCopyStrategy{TBase, TDerived, TConcrete}"/> class.
        /// </summary>
        public GenericCopyStrategy(
            IInstanceCreator <TDerived, TConcrete> creator,
            ICopy <TDerived> copier)
        {
            creator.NotNull(nameof(creator));
            copier.NotNull(nameof(copier));

            this.creator = creator;
            this.copier  = copier;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateCopyHelper{TChild,TConcreteChild,TParent}"/> class.
        /// </summary>
        public CreateCopyHelper(
            IInstanceCreator <TChild, TConcreteChild> instanceCreator,
            ICopy <TChild> copy)
        {
            instanceCreator.NotNull(nameof(instanceCreator));
            copy.NotNull(nameof(copy));

            this.instanceCreator = instanceCreator;
            this.copy            = copy;
        }
Exemple #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GenericCreateByBaseAsCriterionStrategy{TBaseInterface, TCriterion, TConcreteInterface, TInterface, TImpl}"/> class.
        /// </summary>
        public GenericCreateByBaseAsCriterionStrategy(IInstanceCreator <TInterface, TImpl> instanceCreator)
        {
            instanceCreator.NotNull(nameof(instanceCreator));

            this.instanceCreator = instanceCreator;
        }
Exemple #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CreateInstanceOfTypeStrategy{TBaseTypeIntf, TConcreteTypeIntf, TConcreteTypeImpl}"/> class.
        /// </summary>
        public CreateInstanceOfTypeStrategy(IInstanceCreator <TConcreteTypeIntf, TConcreteTypeImpl> instanceCreator)
        {
            instanceCreator.NotNull(nameof(instanceCreator));

            this.instanceCreator = instanceCreator;
        }