本文整理汇总了C#中System.Condition.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Condition.ToString方法的具体用法?C# Condition.ToString怎么用?C# Condition.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Condition
的用法示例。
在下文中一共展示了Condition.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CloseDialog
/// <summary>
/// Initializes a new instance of the <see cref="T:WixSharp.CloseDialog"/> class.
/// </summary>
/// <param name="returnValue">The return value.</param>
/// <param name="condition">The condition.</param>
public CloseDialog(string returnValue, Condition condition)
{
this.Value = returnValue;
this.Name = ControlAction.EndDialog.ToString();
this.Condition = condition.ToString();
}
示例2: SpawnDialog
/// <summary>
/// Initializes a new instance of the <see cref="SpawnDialog"/> class.
/// </summary>
/// <param name="dialogName">Name of the dialog.</param>
/// <param name="condition">The condition.</param>
public SpawnDialog(string dialogName, Condition condition)
{
this.Name = ControlAction.SpawnDialog;
this.Condition = condition.ToString();
this.Value = dialogName;
}
示例3: SearchGeneral
/// <summary>
/// <para>Performs Search method:
/// Search General
/// using the query paramaters provided it will construct a query string for you - can use null if the parameter is not required for your request.
/// </para>
/// DOES NOT REQUIRE AUTHENTICATION.
/// </summary>
/// <param name="category">Specifies the category in which you want to perform the search.</param>
/// <param name="searchString">One or more keywords to use in a search query.</param>
/// <param name="userRegion">Restricts search results to items from sellers located in the specified region.</param>
/// <param name="sortOrder">Sort the returned record-set by a single specified sort order.</param>
/// <param name="buy">Return only listings with BuyNow price.</param>
/// <param name="pay">Return only listings with PayNow.</param>
/// <param name="condition">Filter listings by condition.</param>
/// <param name="dateFrom">Return only listings started from this date.</param>
/// <param name="page">Page number.</param>
/// <param name="rows"> Number of rows per page.</param>
/// <param name="memberListing">Returns only listing from specified member ID.</param>
/// <returns>SearchResults.</returns>
public SearchResults SearchGeneral(
string category,
string searchString,
int? userRegion,
SortOrder sortOrder,
bool? buy,
bool? pay,
Condition condition,
DateTime dateFrom,
int? page,
int? rows,
int? memberListing)
{
_addAnd = false;
var url = String.Format(Constants.Culture, "{0}/General{1}", Constants.SEARCH, Constants.XML);
var conditions = "?";
// create the parameters for the query string
conditions += SearchMethods.ConstructQueryHelper(Constants.CATEGORY, category, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.SEARCH_STRING, searchString, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.USER_REGION, string.Empty + userRegion, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.SORT_ORDER, sortOrder.ToString(), _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.BUY, string.Empty + buy, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.PAY, string.Empty + pay, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.CONDITION, condition.ToString(), _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.DATE_FROM, Client.DateToStringConverter(dateFrom),
_addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.PAGE, string.Empty + page, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.ROWS, string.Empty + rows, _addAnd);
conditions += SearchMethods.ConstructQueryHelper(Constants.MEMBER_LISTING, string.Empty + memberListing,
_addAnd);
// add the paramaters if there are any
if (conditions.Equals("?"))
{
url += conditions;
}
// perform the request
return this.SearchGeneral(url);
}