本文整理汇总了C#中RestSharp.RestRequest.AddParameterIfNotNull方法的典型用法代码示例。如果您正苦于以下问题:C# RestRequest.AddParameterIfNotNull方法的具体用法?C# RestRequest.AddParameterIfNotNull怎么用?C# RestRequest.AddParameterIfNotNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RestSharp.RestRequest
的用法示例。
在下文中一共展示了RestRequest.AddParameterIfNotNull方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: List
public List<ProcessDefinition> List(
int? version = null,
string name = null,
string nameLike = null,
string key = null,
string keyLike = null,
string resourceName = null,
string resourceNameLike = null,
string category = null,
string categoryLike = null,
string categoryNotEquals = null,
string deploymentId = null,
string startableByUser = null,
bool? latest = null,
bool? suspended = null,
RestClientBase.Sort? sort = null,
int? size = null)
{
var request = new RestRequest("repository/process-definitions", Method.GET);
request.AddParameterIfNotNull("version", version);
request.AddParameterIfNotNull("name", name);
request.AddParameterIfNotNull("nameLike", nameLike);
request.AddParameterIfNotNull("key", key);
request.AddParameterIfNotNull("keyLike", keyLike);
request.AddParameterIfNotNull("resourceName", resourceName);
request.AddParameterIfNotNull("resourceNameLike", resourceNameLike);
request.AddParameterIfNotNull("category", category);
request.AddParameterIfNotNull("categoryLike", categoryLike);
request.AddParameterIfNotNull("categoryNotEquals", categoryNotEquals);
request.AddParameterIfNotNull("deploymentId", deploymentId);
request.AddParameterIfNotNull("startableByUser", startableByUser);
request.AddParameterIfNotNull("latest", latest);
request.AddParameterIfNotNull("suspended", suspended);
request.AddParameterIfNotNull("sort", sort);
request.AddParameterIfNotNull("size", size);
var response = base.Client.Execute<DataSet<ProcessDefinition>>(request);
base.HandleError(response);
return response.Data.GetData();
}
示例2: Get
public Form Get(int? taskId = null, string processDefinitionId = null)
{
var request = new RestRequest("form/form-data", Method.GET);
request.AddParameterIfNotNull("taskId", taskId);
request.AddParameterIfNotNull("processDefinitionId", processDefinitionId);
var response = base.Client.Execute<Form>(request);
base.HandleError(response);
return response.Data;
}
示例3: List
public Models.Task List(
string name = null, string nameLike = null, string description = null, int? priority = null,
int? minimumPriority = null, int? maximumPriority = null, string assignee = null, string assigneeLike = null,
string owner = null, string ownerLike = null, bool? unassigned = null, string delegationState = null,
string candidateUser = null, string candidateGroup = null, string involvedUser = null,
string taskDefinitionKey = null, string taskDefinitionKeyLike = null,
string processInstanceId = null, string processInstanceBusinessKey = null,
string processInstanceBusinessKeyLike = null, string processDefinitionKey = null,
string processDefinitionKeyLike = null, string processDefinitionName = null,
string processDefinitionNameLike = null, string executionId = null,
DateTime? createdOn = null, DateTime? createdBefore = null, DateTime? createdAfter = null,
DateTime? dueOn = null, DateTime? dueBefore = null, DateTime? dueAfter = null,
bool? withoutDueDate = null, bool? excludeSubTasks = null, bool? active = null,
bool? includeTaskLocalVariables = null, bool? includeProcessVariables = null,
string tenantId = null, string tenantIdLike = null, string withoutTenantId = null)
{
var request = new RestRequest("runtime/tasks", Method.GET);
request.AddParameterIfNotNull("name", name);
request.AddParameterIfNotNull("nameLike", nameLike);
request.AddParameterIfNotNull("description", description);
request.AddParameterIfNotNull("priority", priority);
request.AddParameterIfNotNull("minimumPriority", minimumPriority);
request.AddParameterIfNotNull("maximumPriority", maximumPriority);
request.AddParameterIfNotNull("assignee", assignee);
request.AddParameterIfNotNull("assigneeLike", assigneeLike);
request.AddParameterIfNotNull("owner", owner);
request.AddParameterIfNotNull("ownerLike", ownerLike);
request.AddParameterIfNotNull("unassigned", unassigned);
request.AddParameterIfNotNull("delegationState", delegationState);
request.AddParameterIfNotNull("candidateUser", candidateUser);
request.AddParameterIfNotNull("candidateGroup", candidateGroup);
request.AddParameterIfNotNull("involvedUser", involvedUser);
request.AddParameterIfNotNull("taskDefinitionKey", taskDefinitionKey);
request.AddParameterIfNotNull("taskDefinitionKeyLike", taskDefinitionKeyLike);
request.AddParameterIfNotNull("processInstanceId", processInstanceId);
request.AddParameterIfNotNull("processInstanceBusinessKey", processInstanceBusinessKey);
request.AddParameterIfNotNull("processInstanceBusinessKeyLike", processInstanceBusinessKeyLike);
request.AddParameterIfNotNull("processDefinitionKey", processDefinitionKey);
request.AddParameterIfNotNull("processDefinitionKeyLike", processDefinitionKeyLike);
request.AddParameterIfNotNull("processDefinitionName", processDefinitionName);
request.AddParameterIfNotNull("processDefinitionNameLike", processDefinitionNameLike);
request.AddParameterIfNotNull("executionId", executionId);
request.AddParameterIfNotNull("createdOn", createdOn.Value.ToString(RestClientBase.ISO_DATE));
request.AddParameterIfNotNull("createdBefore", createdBefore.Value.ToString(RestClientBase.ISO_DATE));
request.AddParameterIfNotNull("createdAfter", createdAfter.Value.ToString(RestClientBase.ISO_DATE));
request.AddParameterIfNotNull("dueOn", dueOn.Value.ToString(RestClientBase.ISO_DATE));
request.AddParameterIfNotNull("dueBefore", dueBefore.Value.ToString(RestClientBase.ISO_DATE));
request.AddParameterIfNotNull("dueAfter", dueAfter.Value.ToString(RestClientBase.ISO_DATE));
request.AddParameterIfNotNull("withoutDueDate", withoutDueDate);
request.AddParameterIfNotNull("excludeSubTasks", excludeSubTasks);
request.AddParameterIfNotNull("active", active);
request.AddParameterIfNotNull("includeTaskLocalVariables", includeTaskLocalVariables);
request.AddParameterIfNotNull("includeProcessVariables", includeProcessVariables);
request.AddParameterIfNotNull("tenantId", tenantId);
request.AddParameterIfNotNull("tenantIdLike", tenantIdLike);
request.AddParameterIfNotNull("withoutTenantId", withoutTenantId);
var response = base.Client.Execute<Models.Task>(request);
base.HandleError(response);
return response.Data;
}