private void LoadDataRecordValue(ParameterInfo parameter, int index)
        {
            MethodInfo getMethod        = MethodSelector.Execute(parameter.ParameterType);
            var        tryLoadNullValue = DefineLabel();
            var        end = DefineLabel();

            EmitCheckForValidOrdinal(index, tryLoadNullValue);
            EmitCheckForDbNull(index, tryLoadNullValue);
            EmitGetValue(index, getMethod, parameter.ParameterType);
            EmitGoto(end);
            MarkLabel(tryLoadNullValue);
            if (parameter.ParameterType.IsValueType)
            {
                if (parameter.ParameterType.IsNullable())
                {
                    var local = ILGenerator.DeclareLocal(parameter.ParameterType);
                    ILGenerator.Emit(OpCodes.Ldloca_S, local);
                    ILGenerator.Emit(OpCodes.Initobj, parameter.ParameterType);
                    ILGenerator.Emit(OpCodes.Ldloc, local);
                }
                else
                {
                    ILGenerator.ThrowException(typeof(InvalidOperationException));
                }
            }
            else
            {
                ILGenerator.Emit(OpCodes.Ldnull);
            }

            MarkLabel(end);
        }
        private void LoadDataRecordValue(PropertyInfo propertyInfo, int index)
        {
            MethodInfo getMethod = MethodSelector.Execute(propertyInfo.PropertyType);
            var        endLabel  = DefineLabel();

            EmitCheckForValidOrdinal(index, endLabel);
            EmitCheckForDbNull(index, endLabel);
            LoadInstance();
            EmitGetValue(index, getMethod, propertyInfo.PropertyType);
            EmitCallPropertySetterMethod(propertyInfo);
            MarkLabel(endLabel);
        }