本文整理汇总了C#中QueryType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# QueryType.ToString方法的具体用法?C# QueryType.ToString怎么用?C# QueryType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryType
的用法示例。
在下文中一共展示了QueryType.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetQueryType
public void SetQueryType(QueryType value)
{
ConditionName = value.ToString();
}
示例2: GetQuery
/// <summary>
/// Return the query string. The "type" parameter ensures that you know what you are doing;
/// an error will result if you request the wrong type.
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public string GetQuery(QueryType type)
{
if (type!=QueryType)
{
throw new InvalidOperationException(String.Format("This query is a {0} query, you requested a {1} query.",QueryType.ToString(),type.ToString()));
}
return GetQuery();
}
示例3: SetQueryType
public void SetQueryType(QueryType value)
{
Field = value.ToString();
}
示例4: ExpectType
public void ExpectType(QueryType type)
{
if (type != ParseQueryType())
{
throw new InvalidOperationException("The query must be of type " + type.ToString());
}
}
示例5: QueryBuilder
public QueryBuilder(QueryType qType)
{
query += qType.ToString() + " ";
}
示例6: GetExternalQueryRegex
private Regex GetExternalQueryRegex(QueryType type)
{
string regex = "\\b" + type.ToString() + "\\b[<]{2}(.*?)[>]{2}";
var options = ((RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline) | RegexOptions.IgnoreCase);
return new Regex(regex, options);
}