Exemplo n.º 1
0
        ///<summary>
        /// Sets value of the specified <see cref="ResultProperty"/> on the target object
        /// when the 'select' and 'resultMap' attributes
        /// on the <see cref="ResultProperty"/> are empties.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="resultMap">The result map.</param>
        /// <param name="mapping">The ResultProperty.</param>
        /// <param name="target">The target.</param>
        /// <param name="reader">The reader.</param>
        /// <param name="keys">The keys</param>
        public void Set(RequestScope request, IResultMap resultMap,
                        ResultProperty mapping, ref object target, IDataReader reader, object keys)
        {
            object obj = Get(request, resultMap, mapping, ref target, reader);

            resultMap.SetValueOfProperty(ref target, mapping, obj);
        }
Exemplo n.º 2
0
		/// <summary>
		/// Sets value of the specified <see cref="ResultProperty"/> on the target object
		/// when a 'resultMapping' attribute exists
		/// on the <see cref="ResultProperty"/>.
		/// </summary>
		/// <param name="request">The request.</param>
		/// <param name="resultMap">The result map.</param>
		/// <param name="mapping">The ResultProperty.</param>
		/// <param name="target">The target.</param>
		/// <param name="reader">The reader.</param>
		/// <param name="keys">The keys</param>
		public void Set(RequestScope request, IResultMap resultMap, 
			ResultProperty mapping, ref object target, IDataReader reader, object keys)
		{
            object obj = Get(request, resultMap, mapping, ref target, reader);
			// Sets created object on the property
			resultMap.SetValueOfProperty( ref target, mapping, obj );		
		}
Exemplo n.º 3
0
		///<summary>
		/// Sets value of the specified <see cref="ResultProperty"/> on the target object
		/// when the 'select' and 'resultMap' attributes 
		/// on the <see cref="ResultProperty"/> are empties.
		/// </summary>
		/// <param name="request">The request.</param>
		/// <param name="resultMap">The result map.</param>
		/// <param name="mapping">The ResultProperty.</param>
		/// <param name="target">The target.</param>
		/// <param name="reader">The reader.</param>
		/// <param name="keys">The keys</param>
		public void Set(RequestScope request, IResultMap resultMap, 
			ResultProperty mapping, ref object target, IDataReader reader, object keys)
		{
            //获取属性mapping的值
            object obj = Get(request, resultMap, mapping, ref target, reader);
            //将mapping的值放到类中对应的属性里
            resultMap.SetValueOfProperty(ref target, mapping, obj);
		}
Exemplo n.º 4
0
        ///<summary>
        /// Sets value of the specified <see cref="ResultProperty"/> on the target object
        /// when the 'select' and 'resultMap' attributes
        /// on the <see cref="ResultProperty"/> are empties.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="resultMap">The result map.</param>
        /// <param name="mapping">The ResultProperty.</param>
        /// <param name="target">The target.</param>
        /// <param name="reader">The reader.</param>
        /// <param name="keys">The keys</param>
        public void Set(RequestScope request, IResultMap resultMap,
                        ResultProperty mapping, ref object target, IDataReader reader, object keys)
        {
            //获取属性mapping的值
            object obj = Get(request, resultMap, mapping, ref target, reader);

            //将mapping的值放到类中对应的属性里
            resultMap.SetValueOfProperty(ref target, mapping, obj);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Sets value of the specified <see cref="ResultProperty"/> on the target object
        /// when a 'resultMapping' attribute exists
        /// on the <see cref="ResultProperty"/>.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="resultMap">The result map.</param>
        /// <param name="mapping">The ResultProperty.</param>
        /// <param name="target">The target.</param>
        /// <param name="reader">The reader.</param>
        /// <param name="keys">The keys</param>
        public void Set(RequestScope request, IResultMap resultMap,
                        ResultProperty mapping, ref object target, IDataReader reader, object keys)
        {
            //获取属性mapping对应的值
            object obj = Get(request, resultMap, mapping, ref target, reader);

            // Sets created object on the property
            //设置target类属性mapping的值为obj
            resultMap.SetValueOfProperty(ref target, mapping, obj);
        }