当前位置: 首页>>代码示例>>C#>>正文


C# ICriteriaQuery.GetTypedValue方法代码示例

本文整理汇总了C#中ICriteriaQuery.GetTypedValue方法的典型用法代码示例。如果您正苦于以下问题:C# ICriteriaQuery.GetTypedValue方法的具体用法?C# ICriteriaQuery.GetTypedValue怎么用?C# ICriteriaQuery.GetTypedValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICriteriaQuery的用法示例。


在下文中一共展示了ICriteriaQuery.GetTypedValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTypedValues

		public override TypedValue[] GetTypedValues(ICriteria criteria, ICriteriaQuery criteriaQuery)
		{
			return new TypedValue[]
				{
					criteriaQuery.GetTypedValue(criteria, _propertyName, _value.ToString().ToLower())
				};
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:7,代码来源:InsensitiveLikeExpression.cs

示例2: GetTypedValues

 /// <summary>
 /// Return typed values for all parameters in the rendered SQL fragment
 /// </summary>
 /// <param name="criteria"></param>
 /// <param name="criteriaQuery"></param>
 /// <returns>
 /// An array of TypedValues for the Expression.
 /// </returns>
 public override TypedValue[] GetTypedValues(ICriteria criteria, ICriteriaQuery criteriaQuery)
 {
     if (this.anotherGeometry is IGeometry)
     {
         return new TypedValue[] { criteriaQuery.GetTypedValue(criteria, propertyName, anotherGeometry) };
     }
     return new TypedValue[0];
 }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:16,代码来源:SpatialRelationCriterion.cs

示例3: GetTypedValues

        public static TypedValue[] GetTypedValues(ICriteriaQuery criteriaQuery, ICriteria criteria,
            IProjection projection,
            string propertyName,
            params object[] values)
        {
            List<TypedValue> types = new List<TypedValue>();
            if (projection == null)
            {
                foreach (object value in values)
                {
                    TypedValue typedValue = criteriaQuery.GetTypedValue(criteria, propertyName, value);
                    types.Add(typedValue);
                }
            }
            else
            {
                TypedValue[] typedValues = projection.GetTypedValues(criteria, criteriaQuery);
                types.AddRange(typedValues);
                // we add the values collection _twice_ on purpose.
                // once is for the projection types, if they exists
                // the second for the parameters of the expression itself
                // if the projection is using no types, we will try to guess
                // what we have here
                foreach (object value in values)
                {
                    if (typedValues.Length != 0)
                    {
                        types.AddRange(typedValues);
                    }
                    else
                    {
                        types.Add(new TypedValue(NHibernateUtil.GuessType((object)value), value, EntityMode.Poco));
                    }
                }

            }
            return types.ToArray();
        }
开发者ID:zibler,项目名称:zibler,代码行数:38,代码来源:CriterionUtil.cs

示例4: GetTypedValues

		/// <summary>
		/// Return typed values for all parameters in the rendered SQL fragment
		/// </summary>
		/// <param name="criteria"></param>
		/// <param name="criteriaQuery"></param>
		/// <returns>
		/// An array of TypedValues for the Expression.
		/// </returns>
		public override TypedValue[] GetTypedValues(ICriteria criteria, ICriteriaQuery criteriaQuery)
		{
			return new TypedValue[] { criteriaQuery.GetTypedValue(criteria, this.propertyName, this.envelope ) };
		}
开发者ID:knorrus,项目名称:nhcontrib,代码行数:12,代码来源:SpatialFilterCriterion.cs

示例5: GetTypedValues

		public override TypedValue[] GetTypedValues(ICriteria criteria, ICriteriaQuery criteriaQuery)
		{
			List<TypedValue> typedValues = new List<TypedValue>();
			
			if (projection != null)
			{
				typedValues.AddRange(projection.GetTypedValues(criteria, criteriaQuery));
				typedValues.AddRange(CriterionUtil.GetTypedValues(criteriaQuery, criteria, projection, null, value.ToString().ToLower()));
			}
			else
				typedValues.Add(criteriaQuery.GetTypedValue(criteria, propertyName, value.ToString().ToLower()));
			
			return typedValues.ToArray();
		}
开发者ID:juanplopes,项目名称:nhibernate,代码行数:14,代码来源:InsensitiveLikeExpression.cs

示例6: GetParameterTypedValue

		public TypedValue GetParameterTypedValue(ICriteria criteria, ICriteriaQuery criteriaQuery)
		{
			var matchValue = value.ToString().ToLower();
			if (projection != null)
			{
				return CriterionUtil.GetTypedValues(criteriaQuery, criteria, projection, null, matchValue).Single();
			}
			return criteriaQuery.GetTypedValue(criteria, propertyName, matchValue);
		}
开发者ID:hoangduc007,项目名称:nhibernate-core,代码行数:9,代码来源:InsensitiveLikeExpression.cs

示例7: GetTypedValues

		public static TypedValue[] GetTypedValues(ICriteriaQuery criteriaQuery, ICriteria criteria,
		                                          IProjection projection,
		                                          string propertyName,
		                                          params object[] values)
		{
			List<TypedValue> types = new List<TypedValue>();
			var propertyProjection = projection as IPropertyProjection;
			if (projection == null || propertyProjection != null)
			{
				var pn = propertyProjection != null ? propertyProjection.PropertyName : propertyName;
				foreach (object value in values)
				{
					TypedValue typedValue = criteriaQuery.GetTypedValue(criteria, pn, value); 					
					types.Add(typedValue);
				}
			}
			else
			{
				foreach (object value in values)
				{
					types.Add(new TypedValue(NHibernateUtil.GuessType((object)value), value, EntityMode.Poco));
				}
			}
			return types.ToArray();

		}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:26,代码来源:CriterionUtil.cs

示例8: GetTypedValues

		public override TypedValue[] GetTypedValues(ICriteria criteria, ICriteriaQuery criteriaQuery)
		{
			object icvalue = _ignoreCase ? _value.ToString().ToLower() : _value;
			return new TypedValue[]
				{
					criteriaQuery.GetTypedValue(criteria, _propertyName, icvalue)
				};
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:8,代码来源:SimpleExpression.cs

示例9: GetParameterTypedValue

		public TypedValue GetParameterTypedValue(ICriteria criteria, ICriteriaQuery criteriaQuery)
		{
			object icvalue = ignoreCase ? value.ToString().ToLower() : value;
			if (_projection != null)
			{
				return CriterionUtil.GetTypedValues(criteriaQuery, criteria, _projection, null, icvalue).Single();
			}
			return criteriaQuery.GetTypedValue(criteria, propertyName, icvalue);
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:9,代码来源:SimpleExpression.cs

示例10: GetTypedValues

 public override TypedValue[] GetTypedValues(ICriteria criteria, ICriteriaQuery criteriaQuery)
 {
     return new TypedValue[] {criteriaQuery.GetTypedValue(criteria, propertyName, ignoreCase ? value.ToLower() : value)};
 }
开发者ID:zibler,项目名称:zibler,代码行数:4,代码来源:LikeExpression.cs


注:本文中的ICriteriaQuery.GetTypedValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。