Пример #1
0
        /// <summary>
        /// Creates the specified PrintTask using POST.
        /// </summary>
        /// <param name="printTaskToCreate">The PrintTask to create.</param>
        /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
        /// <returns>The created PrintTask.</returns>
        public async System.Threading.Tasks.Task <PrintTask> CreateAsync(PrintTask printTaskToCreate, CancellationToken cancellationToken)
        {
            this.ContentType = "application/json";
            this.Method      = "POST";
            var newEntity = await this.SendAsync <PrintTask>(printTaskToCreate, cancellationToken).ConfigureAwait(false);

            this.InitializeCollectionProperties(newEntity);
            return(newEntity);
        }
 /// <summary>
 /// Adds the specified PrintTask to the collection via POST.
 /// </summary>
 /// <param name="printTask">The PrintTask to add.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
 /// <returns>The created PrintTask.</returns>
 public System.Threading.Tasks.Task <PrintTask> AddAsync(PrintTask printTask, CancellationToken cancellationToken)
 {
     this.ContentType = "application/json";
     this.Method      = "POST";
     return(this.SendAsync <PrintTask>(printTask, cancellationToken));
 }
 /// <summary>
 /// Adds the specified PrintTask to the collection via POST.
 /// </summary>
 /// <param name="printTask">The PrintTask to add.</param>
 /// <returns>The created PrintTask.</returns>
 public System.Threading.Tasks.Task <PrintTask> AddAsync(PrintTask printTask)
 {
     return(this.AddAsync(printTask, CancellationToken.None));
 }
Пример #4
0
 /// <summary>
 /// Creates the specified PrintTask using POST.
 /// </summary>
 /// <param name="printTaskToCreate">The PrintTask to create.</param>
 /// <returns>The created PrintTask.</returns>
 public System.Threading.Tasks.Task <PrintTask> CreateAsync(PrintTask printTaskToCreate)
 {
     return(this.CreateAsync(printTaskToCreate, CancellationToken.None));
 }
Пример #5
0
 /// <summary>
 /// Initializes any collection properties after deserialization, like next requests for paging.
 /// </summary>
 /// <param name="printTaskToInitialize">The <see cref="PrintTask"/> with the collection properties to initialize.</param>
 private void InitializeCollectionProperties(PrintTask printTaskToInitialize)
 {
 }