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


C# Condition.ToString方法代码示例

本文整理汇总了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();
 }
开发者ID:Eun,项目名称:WixSharp,代码行数:11,代码来源:CustomUI.cs

示例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;
 }
开发者ID:Eun,项目名称:WixSharp,代码行数:11,代码来源:CustomUI.cs

示例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);
        }
开发者ID:KinoZha,项目名称:trade-me-api-wrapper,代码行数:60,代码来源:SearchMethods.cs


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