public Task <BatchInfoResult> CreateJobBatchAsync <T>(JobInfoResult jobInfo, ISObjectList <T> recordsList, CancellationToken token)
 {
     if (jobInfo == null)
     {
         throw new ArgumentNullException("jobInfo");
     }
     return(CreateJobBatchAsync(jobInfo.Id, recordsList, token));
 }
예제 #2
0
 public Task <BatchInfoResult> CreateJobBatchAsync <T>(JobInfoResult jobInfo, ISObjectList <T> recordsList)
 {
     if (jobInfo == null)
     {
         throw new ArgumentNullException(nameof(jobInfo));
     }
     return(CreateJobBatchAsync(jobInfo.Id, recordsList));
 }
        public Task <BatchInfoResult> CreateJobBatchAsync <T>(string jobId, ISObjectList <T> recordsObject, CancellationToken token)
        {
            if (string.IsNullOrEmpty(jobId))
            {
                throw new ArgumentNullException("jobId");
            }
            if (recordsObject == null)
            {
                throw new ArgumentNullException("recordsObject");
            }

            return(_xmlHttpClient.HttpPostAsync <BatchInfoResult>(recordsObject, string.Format("/services/async/{{0}}/job/{0}/batch", jobId), token));
        }
예제 #4
0
        public async Task <BatchInfoResult> CreateJobBatchAsync <T>(string jobId, ISObjectList <T> recordsObject)
        {
            if (string.IsNullOrEmpty(jobId))
            {
                throw new ArgumentNullException("jobId");
            }
            if (recordsObject == null)
            {
                throw new ArgumentNullException("recordsObject");
            }

            return(await _xmlHttpClient.HttpPostAsync <BatchInfoResult>(recordsObject, string.Format("/services/async/{{0}}/job/{0}/batch", jobId))
                   .ConfigureAwait(false));
        }
예제 #5
0
        public async Task <BatchInfoResult> CreateJobBatchAsync <T>(string?jobId, ISObjectList <T> recordsObject)
        {
            if (string.IsNullOrEmpty(jobId))
            {
                throw new ArgumentNullException(nameof(jobId));
            }
            if (recordsObject == null)
            {
                throw new ArgumentNullException(nameof(recordsObject));
            }

            var resourceName = $"/services/async/{{0}}/job/{jobId}/batch";

            return(await XmlHttpClient.HttpPostAsync <BatchInfoResult>(recordsObject, resourceName)
                   .ConfigureAwait(false) ?? new BatchInfoResult());
        }
예제 #6
0
 public async Task <BatchInfoResult> CreateJobBatchAsync <T>(JobInfoResult jobInfo, ISObjectList <T> recordsList)
 {
     if (jobInfo == null)
     {
         throw new ArgumentNullException("jobInfo");
     }
     return(await CreateJobBatchAsync(jobInfo.Id, recordsList).ConfigureAwait(false));
 }