コード例 #1
0
        /// <summary>
        /// Sends all changes registered on Document sets to Sanity as a transactional set of mutations.
        /// </summary>
        /// <param name="returnIds"></param>
        /// <param name="returnDocuments"></param>
        /// <param name="visibility"></param>
        /// <returns></returns>
        public async Task <SanityMutationResponse> CommitAsync(bool returnIds = false, bool returnDocuments = false, SanityMutationVisibility visibility = SanityMutationVisibility.Sync, CancellationToken cancellationToken = default)
        {
            var result = await Client.CommitMutationsAsync(Mutations.Build(Client.SerializerSettings), returnIds, returnDocuments, visibility, cancellationToken).ConfigureAwait(false);

            Mutations.Clear();
            return(result);
        }