Exemple #1
0
        /// <summary>Snippet for RollbackAsync</summary>
        public async Task RollbackAsync()
        {
            // Snippet: RollbackAsync(string, ByteString, CallSettings)
            // Additional: RollbackAsync(string, ByteString, CancellationToken)
            // Create client
            FirestoreClient firestoreClient = await FirestoreClient.CreateAsync();

            // Initialize request argument(s)
            string     database    = "";
            ByteString transaction = ByteString.Empty;
            // Make the request
            await firestoreClient.RollbackAsync(database, transaction);

            // End snippet
        }
        /// <summary>Snippet for RollbackAsync</summary>
        public async Task RollbackAsync()
        {
            // Snippet: RollbackAsync(string,ByteString,CallSettings)
            // Additional: RollbackAsync(string,ByteString,CancellationToken)
            // Create client
            FirestoreClient firestoreClient = await FirestoreClient.CreateAsync();

            // Initialize request argument(s)
            string     formattedDatabase = new DatabaseRootName("[PROJECT]", "[DATABASE]").ToString();
            ByteString transaction       = ByteString.CopyFromUtf8("");
            // Make the request
            await firestoreClient.RollbackAsync(formattedDatabase, transaction);

            // End snippet
        }
        /// <summary>Snippet for RollbackAsync</summary>
        public async Task RollbackAsync_RequestObject()
        {
            // Snippet: RollbackAsync(RollbackRequest,CallSettings)
            // Create client
            FirestoreClient firestoreClient = await FirestoreClient.CreateAsync();

            // Initialize request argument(s)
            RollbackRequest request = new RollbackRequest
            {
                Database    = new DatabaseRootName("[PROJECT]", "[DATABASE]").ToString(),
                Transaction = ByteString.CopyFromUtf8(""),
            };
            // Make the request
            await firestoreClient.RollbackAsync(request);

            // End snippet
        }
Exemple #4
0
        /// <summary>Snippet for RollbackAsync</summary>
        public async Task RollbackRequestObjectAsync()
        {
            // Snippet: RollbackAsync(RollbackRequest, CallSettings)
            // Additional: RollbackAsync(RollbackRequest, CancellationToken)
            // Create client
            FirestoreClient firestoreClient = await FirestoreClient.CreateAsync();

            // Initialize request argument(s)
            RollbackRequest request = new RollbackRequest
            {
                Database    = "",
                Transaction = ByteString.Empty,
            };
            // Make the request
            await firestoreClient.RollbackAsync(request);

            // End snippet
        }