示例#1
0
        /// <inheritdoc />
        public override async Task <RollbackResponse> RollbackAsync(CallSettings callSettings = null)
        {
            CheckActive();
            var response = await _client.RollbackAsync(_projectId, TransactionId, callSettings);

            _active = false;
            return(response);
        }
        public async Task RollbackAsync()
        {
            // Snippet: RollbackAsync(string,ByteString,CallSettings)
            // Additional: RollbackAsync(string,ByteString,CancellationToken)
            // Create client
            DatastoreClient datastoreClient = DatastoreClient.Create();
            // Initialize request argument(s)
            string     projectId   = "";
            ByteString transaction = ByteString.CopyFromUtf8("");
            // Make the request
            RollbackResponse response = await datastoreClient.RollbackAsync(projectId, transaction);

            // End snippet
        }
示例#3
0
        public async Task RollbackAsync_RequestObject()
        {
            // Snippet: RollbackAsync(RollbackRequest,CallSettings)
            // Create client
            DatastoreClient datastoreClient = await DatastoreClient.CreateAsync();

            // Initialize request argument(s)
            RollbackRequest request = new RollbackRequest
            {
                ProjectId   = "",
                Transaction = ByteString.CopyFromUtf8(""),
            };
            // Make the request
            RollbackResponse response = await datastoreClient.RollbackAsync(request);

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

            // Initialize request argument(s)
            RollbackRequest request = new RollbackRequest
            {
                Transaction = ByteString.Empty,
                ProjectId   = "",
            };
            // Make the request
            RollbackResponse response = await datastoreClient.RollbackAsync(request);

            // End snippet
        }