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


C# this.AddParameter方法代码示例

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


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

示例1: AddPaging

		public static void AddPaging(this RestRequest request, Paging paging)
		{
			if (paging == null)
				return;

			request.AddParameter("limit", paging.Limit, ParameterType.GetOrPost);
			request.AddParameter("page", paging.Page, ParameterType.GetOrPost);
		}
开发者ID:kareem613,项目名称:Trello.NET,代码行数:8,代码来源:RestRequestExtensions.cs

示例2: AddCommonCardParameters

		public static void AddCommonCardParameters(this RestRequest request)
		{
			request.AddParameter("labels", "true");
			request.AddParameter("badges", "true");
			request.AddParameter("checkItemStates", "true");
			request.AddParameter("attachments", "true");
			request.AddParameter("checklists", "all");
		}
开发者ID:kareem613,项目名称:Trello.NET,代码行数:8,代码来源:RestRequestExtensions.cs

示例3: AddSince

		public static void AddSince(this RestRequest request, ISince since)
		{
			if (since == null) 
				return;

			if (since.LastView)
				request.AddParameter("since", "lastView");
			if (since.Date > DateTime.MinValue)
				request.AddParameter("since", since.Date);
		}
开发者ID:pabloescribano,项目名称:Trello.NET,代码行数:10,代码来源:RestRequestExtensions.cs

示例4: AddSince

		public static void AddSince(this RestRequest request, ISince since)
		{
			if (since == null) 
				return;

			if (since.LastView)
				request.AddParameter("since", "lastView");
			if (since.Date > DateTime.MinValue)
				request.AddParameter("since", since.Date.ToString("yyyy-MM-ddTHH:mm:ss.fffK"));
		}
开发者ID:kareem613,项目名称:Trello.NET,代码行数:10,代码来源:RestRequestExtensions.cs

示例5: Returns

 public static NpgsqlCommand Returns(this NpgsqlCommand command, string name, NpgsqlDbType type)
 {
     var parameter = command.AddParameter(name);
     parameter.NpgsqlDbType = type;
     parameter.Direction = ParameterDirection.ReturnValue;
     return command;
 }
开发者ID:bojanv91,项目名称:Marten,代码行数:7,代码来源:CommandExtensions.cs

示例6: AddParameters

 public static void AddParameters( this IDbCommand dbCommand, IEnumerable<IParameterStub> parameterStubs )
 {
     foreach ( var parameterStub in parameterStubs )
     {
         dbCommand.AddParameter( parameterStub );
     }
 }
开发者ID:StarTrekRedneck,项目名称:IDbEz,代码行数:7,代码来源:DbCommandExtensions.cs

示例7: AddParameter

 public static void AddParameter(this HttpRequestMessage request, string key, IFormattable value)
 {
     if (value != null)
     {
         request.AddParameter(key, value.ToString(null, CultureInfo.InvariantCulture));
     }
 }
开发者ID:happynik,项目名称:InstaSharp,代码行数:7,代码来源:HttpRequestMessageExtensions.cs

示例8: AddParameterIfNotNull

 public static IRestRequest AddParameterIfNotNull(this RestRequest @this, string name, object value)
 {
     if (value != null)
         return @this.AddParameter(name, value);
     else
         return @this;
 }
开发者ID:jyamashita,项目名称:ActivitiClient,代码行数:7,代码来源:RestRequest.cs

示例9: AddSafeParameter

 public static void AddSafeParameter(this IRestRequest request, string parameter, object value)
 {
     if (!string.IsNullOrEmpty(parameter) && value != null)
     {
         request.AddParameter(parameter, value);
     }
 }
开发者ID:ocgineer,项目名称:OakBot,代码行数:7,代码来源:RequestExtensions.cs

示例10: AddParameterMax

 public static void AddParameterMax(this List<byte> source, int value)
 {
     if (value == Int32.MaxValue)
         source.Add(Constants.EOL);
     else
       source.AddParameter(value);
 }
开发者ID:conradakunga,项目名称:QuantTrading,代码行数:7,代码来源:IBParamsList.cs

示例11: Where

        public static Query Where(this Query qry, string criterium)
        {
            var keyVal = criterium.SplitLeft('=');
            qry.AddParameter(keyVal.Item1, keyVal.Item2);

            return qry;
        }
开发者ID:peterswallow,项目名称:fhir-net-api,代码行数:7,代码来源:QueryExtensions.cs

示例12: AddParameterMax

 public static void AddParameterMax(this BinaryWriter source, int value)
 {
     if (value == Int32.MaxValue)
         source.Write(Constants.EOL);
     else
         source.AddParameter(value);
 }
开发者ID:zjxbetter,项目名称:StockSharp,代码行数:7,代码来源:IBParamsList.cs

示例13: BindParameter

 /// <summary>
 /// Add bool parameter if the vlaue is true, since the default value for bool in powershell is false
 /// </summary>
 /// <param name="ps">PowerShell instance</param>
 /// <param name="parameter">Parameter name</param>
 /// <param name="value">Parameter value</param>
 public static void BindParameter(this PowerShell ps, string parameter, bool value)
 {
     if (value)
     {
         ps.AddParameter(parameter);
     }
 }
开发者ID:B-Rich,项目名称:azure-sdk-tools,代码行数:13,代码来源:PowerShellExtension.cs

示例14: AddTypeFilter

		public static void AddTypeFilter(this RestRequest request, IEnumerable<ActionType> filters)
		{
			if (filters == null || !filters.Any())
				return;

			var filterString = string.Join(",", filters.Select(f => f.ToTrelloString()));
			request.AddParameter("filter", filterString, ParameterType.GetOrPost);
		}
开发者ID:pabloescribano,项目名称:Trello.NET,代码行数:8,代码来源:RestRequestExtensions.cs

示例15: AddDateTimeParameterToAppender

 public static void AddDateTimeParameterToAppender(this log4net.Appender.AdoNetAppender appender, string paramName)
 {
     AdoNetAppenderParameter param = new AdoNetAppenderParameter();
     param.ParameterName = paramName;
     param.DbType = System.Data.DbType.DateTime;
     param.Layout = new RawUtcTimeStampLayout();
     appender.AddParameter(param);
 }
开发者ID:marcin-sitko,项目名称:Log4NetBug,代码行数:8,代码来源:TestClass.cs


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