本文整理汇总了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);
}
示例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");
}
示例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);
}
示例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"));
}
示例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;
}
示例6: AddParameters
public static void AddParameters( this IDbCommand dbCommand, IEnumerable<IParameterStub> parameterStubs )
{
foreach ( var parameterStub in parameterStubs )
{
dbCommand.AddParameter( parameterStub );
}
}
示例7: AddParameter
public static void AddParameter(this HttpRequestMessage request, string key, IFormattable value)
{
if (value != null)
{
request.AddParameter(key, value.ToString(null, CultureInfo.InvariantCulture));
}
}
示例8: AddParameterIfNotNull
public static IRestRequest AddParameterIfNotNull(this RestRequest @this, string name, object value)
{
if (value != null)
return @this.AddParameter(name, value);
else
return @this;
}
示例9: AddSafeParameter
public static void AddSafeParameter(this IRestRequest request, string parameter, object value)
{
if (!string.IsNullOrEmpty(parameter) && value != null)
{
request.AddParameter(parameter, value);
}
}
示例10: AddParameterMax
public static void AddParameterMax(this List<byte> source, int value)
{
if (value == Int32.MaxValue)
source.Add(Constants.EOL);
else
source.AddParameter(value);
}
示例11: Where
public static Query Where(this Query qry, string criterium)
{
var keyVal = criterium.SplitLeft('=');
qry.AddParameter(keyVal.Item1, keyVal.Item2);
return qry;
}
示例12: AddParameterMax
public static void AddParameterMax(this BinaryWriter source, int value)
{
if (value == Int32.MaxValue)
source.Write(Constants.EOL);
else
source.AddParameter(value);
}
示例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);
}
}
示例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);
}
示例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);
}