コード例 #1
0
 /// <summary>
 /// Adds the specified Microsoft.Graph.EntityType2 to the collection via POST.
 /// </summary>
 /// <param name="entityType2">The Microsoft.Graph.EntityType2 to add.</param>
 /// <returns>The created Microsoft.Graph.EntityType2.</returns>
 public System.Threading.Tasks.Task <Microsoft.Graph.EntityType2> AddAsync(Microsoft.Graph.EntityType2 entityType2)
 {
     return(this.AddAsync(entityType2, CancellationToken.None));
 }
コード例 #2
0
 /// <summary>
 /// Adds the specified Microsoft.Graph.EntityType2 to the collection via POST.
 /// </summary>
 /// <param name="entityType2">The Microsoft.Graph.EntityType2 to add.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
 /// <returns>The created Microsoft.Graph.EntityType2.</returns>
 public System.Threading.Tasks.Task <Microsoft.Graph.EntityType2> AddAsync(Microsoft.Graph.EntityType2 entityType2, CancellationToken cancellationToken)
 {
     this.ContentType = "application/json";
     this.Method      = "POST";
     return(this.SendAsync <Microsoft.Graph.EntityType2>(entityType2, cancellationToken));
 }
 /// <summary>
 /// Adds the specified Microsoft.Graph.EntityType2 to the collection via POST and returns a <see cref="GraphResponse{Microsoft.Graph.EntityType2}"/> object of the request.
 /// </summary>
 /// <param name="entityType2">The Microsoft.Graph.EntityType2 to add.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
 /// <returns>The <see cref="GraphResponse{Microsoft.Graph.EntityType2}"/> object of the request.</returns>
 public System.Threading.Tasks.Task <GraphResponse <Microsoft.Graph.EntityType2> > AddResponseAsync(Microsoft.Graph.EntityType2 entityType2, CancellationToken cancellationToken = default)
 {
     this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
     this.Method      = HttpMethods.POST;
     return(this.SendAsyncWithGraphResponse <Microsoft.Graph.EntityType2>(entityType2, cancellationToken));
 }