本文整理汇总了C#中CriteriaOperator.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CriteriaOperator.ToString方法的具体用法?C# CriteriaOperator.ToString怎么用?C# CriteriaOperator.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CriteriaOperator
的用法示例。
在下文中一共展示了CriteriaOperator.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetExpressionEvaluator
private ExpressionEvaluator GetExpressionEvaluator(CriteriaOperator criteria)
{
if (criteria.ToString() == lastCriteria)
return lastEvaluator;
lastCriteria = criteria.ToString();
PropertyDescriptorCollection pdc = ((ITypedList)_View.DataSource).GetItemProperties(null);
lastEvaluator = new ExpressionEvaluator(pdc, criteria, false);
return lastEvaluator;
}
示例2: Replace
public void Replace(ref CriteriaOperator criteriaOperator, string matchString, CriteriaOperator replaceOperator)
{
if (criteriaOperator.ToString() == matchString)
{
criteriaOperator = replaceOperator;
return;
}
Extract(criteriaOperator, matchString, replaceOperator);
}
示例3: Remove
public void Remove(ref CriteriaOperator criteriaOperator, string removeString)
{
if (criteriaOperator.ToString() == removeString)
{
criteriaOperator = null;
return;
}
Extract(criteriaOperator, removeString);
}
示例4: Parse
public static CriteriaOperator Parse(string propertyPath, CriteriaOperator criteriaOperator) {
while (propertyPath.IndexOf(".", StringComparison.Ordinal) > -1) {
propertyPath = propertyPath.Substring(0, propertyPath.IndexOf(".", StringComparison.Ordinal)) + "[" +
propertyPath.Substring(propertyPath.IndexOf(".", StringComparison.Ordinal) + 1) + "]";
}
for (int i = propertyPath.Length - 1; i > -1; i--)
if (propertyPath[i] != ']') {
propertyPath = propertyPath.Substring(0, i + 1) + "[" + criteriaOperator.ToString() + "]" +
new string(']', propertyPath.Length - i - 1);
break;
}
return CriteriaOperator.Parse(propertyPath);
}
示例5: Parse
public static CriteriaOperator Parse(string propertyPath, CriteriaOperator criteriaOperator)
{
while (propertyPath.IndexOf(".")>-1)
{
propertyPath = propertyPath.Substring(0, propertyPath.IndexOf(".")) + "[" +
propertyPath.Substring(propertyPath.IndexOf(".") + 1) + "]";
}
// string replace = criteriaOperator.ToString().Replace("[","").Replace("]","").Replace(" ","");
for (int i = propertyPath.Length-1; i > -1; i--)
if (propertyPath[i] != ']')
{
propertyPath = propertyPath.Substring(0, i+1) + "[" + criteriaOperator.ToString() + "]" +
new string(']', propertyPath.Length - i-1);
break;
}
return CriteriaOperator.Parse(propertyPath);
}