/// <summary> /// Initializes a new instance of the <see cref="ConstructorMapperDelegateBuilder{T}"/> class. /// </summary> /// <param name="methodSkeleton"> /// A <see cref="IMethodSkeleton{T}"/> implementation that /// represents the method skeleton for which to emit the method body. /// </param> /// <param name="methodSelector"> /// The <see cref="IMethodSelector"/> implementation that is responsible for providing a get method /// that targets an <see cref="IDataRecord"/> instance. /// </param> /// <param name="constructorSelector"> /// A <see cref="IConstructorSelector"/> that is responsible for selecting the constructor to be used. /// </param> public ConstructorMapperDelegateBuilder(IMethodSkeleton <T> methodSkeleton, IMethodSelector methodSelector, IConstructorSelector constructorSelector) : base(methodSkeleton, methodSelector) { this.constructorSelector = constructorSelector; }
/// <summary> /// Initializes a new instance of the <see cref="PropertyMapperDelegateBuilder{T}"/> class. /// </summary> /// <param name="methodSkeleton"> /// A <see cref="IMethodSkeleton{T}"/> implementation that /// represents the method skeleton for which to emit the method body. /// </param> /// <param name="methodSelector"> /// The <see cref="IMethodSelector"/> implementation that is responsible for providing a get method /// that targets an <see cref="IDataRecord"/> instance. /// </param> /// <param name="propertySelector"> /// A <see cref="IPropertySelector"/> that is responsible for selecting the properties that will have its /// value read from an <see cref="IDataRecord"/> instance. /// </param> public PropertyMapperDelegateBuilder(IMethodSkeleton <T> methodSkeleton, IMethodSelector methodSelector, IPropertySelector propertySelector) : base(methodSkeleton, methodSelector) { this.propertySelector = propertySelector; }
/// <summary> /// Initializes a new instance of the <see cref="MapperDelegateBuilder{T}"/> class. /// </summary> /// <param name="methodSkeleton"> /// The <see cref="IMethodSkeleton{T}"/> that represents the dynamic method to be created. /// </param> /// <param name="methodSelector"> /// The <see cref="IMethodSelector"/> that is responsible for providing a get method /// used to read values from an <see cref="IDataRecord"/>. /// </param> protected MapperDelegateBuilder(IMethodSkeleton <T> methodSkeleton, IMethodSelector methodSelector) { MethodSelector = methodSelector; this.methodSkeleton = methodSkeleton; ILGenerator = methodSkeleton.GetILGenerator(); }