示例#1
0
        /// <summary>
        /// Creates the specified EmptyEntityTypeWithBaseType using POST.
        /// </summary>
        /// <param name="emptyEntityTypeWithBaseTypeToCreate">The EmptyEntityTypeWithBaseType to create.</param>
        /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
        /// <returns>The created EmptyEntityTypeWithBaseType.</returns>
        public async System.Threading.Tasks.Task <EmptyEntityTypeWithBaseType> CreateAsync(EmptyEntityTypeWithBaseType emptyEntityTypeWithBaseTypeToCreate, CancellationToken cancellationToken = default)
        {
            this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
            this.Method      = HttpMethods.POST;
            var newEntity = await this.SendAsync <EmptyEntityTypeWithBaseType>(emptyEntityTypeWithBaseTypeToCreate, cancellationToken).ConfigureAwait(false);

            this.InitializeCollectionProperties(newEntity);
            return(newEntity);
        }
示例#2
0
 /// <summary>
 /// Creates the specified EmptyEntityTypeWithBaseType using POST and returns a <see cref="GraphResponse{EmptyEntityTypeWithBaseType}"/> object.
 /// </summary>
 /// <param name="emptyEntityTypeWithBaseTypeToCreate">The EmptyEntityTypeWithBaseType to create.</param>
 /// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
 /// <returns>The <see cref="GraphResponse{EmptyEntityTypeWithBaseType}"/> object of the request.</returns>
 public System.Threading.Tasks.Task <GraphResponse <EmptyEntityTypeWithBaseType> > CreateResponseAsync(EmptyEntityTypeWithBaseType emptyEntityTypeWithBaseTypeToCreate, CancellationToken cancellationToken = default)
 {
     this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
     this.Method      = HttpMethods.POST;
     return(this.SendAsyncWithGraphResponse <EmptyEntityTypeWithBaseType>(emptyEntityTypeWithBaseTypeToCreate, cancellationToken));
 }
示例#3
0
 /// <summary>
 /// Initializes any collection properties after deserialization, like next requests for paging.
 /// </summary>
 /// <param name="emptyEntityTypeWithBaseTypeToInitialize">The <see cref="EmptyEntityTypeWithBaseType"/> with the collection properties to initialize.</param>
 private void InitializeCollectionProperties(EmptyEntityTypeWithBaseType emptyEntityTypeWithBaseTypeToInitialize)
 {
 }