コード例 #1
0
ファイル: TasksClient.cs プロジェクト: ajupov/Crm.v1.Clients
 public Task <Guid> CreateAsync(
     CrmTask task,
     Dictionary <string, string> headers = default,
     CancellationToken ct = default)
 {
     return(_factory.PostAsync <Guid>(_host + "/Tasks/v1/Create", null, task, headers, ct));
 }
コード例 #2
0
ファイル: TasksClient.cs プロジェクト: ajupov/Crm.v1.Clients
 public Task UpdateAsync(
     CrmTask task,
     Dictionary <string, string> headers = default,
     CancellationToken ct = default)
 {
     return(_factory.PatchAsync(_host + "/Tasks/v1/Update", null, task, headers, ct));
 }
コード例 #3
0
 public TaskBuilder(IDefaultRequestHeadersService defaultRequestHeadersService, ITasksClient tasksClient)
 {
     _tasksClient = tasksClient;
     _defaultRequestHeadersService = defaultRequestHeadersService;
     _task = new CrmTask
     {
         Id               = Guid.NewGuid(),
         Name             = "Test".WithGuid(),
         Description      = "Test".WithGuid(),
         Result           = "Test".WithGuid(),
         Priority         = TaskPriority.Medium,
         StartDateTime    = DateTime.UtcNow,
         EndDateTime      = DateTime.UtcNow.AddDays(1),
         DeadLineDateTime = null,
         IsDeleted        = false
     };
 }