Ejemplo n.º 1
0
        /// <inheritdoc/>
        public async override Task <DatastoreTransaction> BeginTransactionAsync(TransactionOptions options, CallSettings callSettings = null)
        {
            var request = new BeginTransactionRequest {
                ProjectId = ProjectId, TransactionOptions = options
            };
            var response = await Client.BeginTransactionAsync(request, callSettings).ConfigureAwait(false);

            return(DatastoreTransaction.Create(Client, ProjectId, NamespaceId, response.Transaction));
        }
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public override DatastoreTransaction BeginTransaction(TransactionOptions options, CallSettings callSettings = null)
        {
            var request = new BeginTransactionRequest {
                ProjectId = ProjectId, TransactionOptions = options
            };
            var response = Client.BeginTransaction(request, callSettings);

            return(DatastoreTransaction.Create(Client, ProjectId, NamespaceId, response.Transaction));
        }
        /// <inheritdoc/>
        public async override Task <DatastoreTransaction> BeginTransactionAsync(CallSettings callSettings = null)
        {
            var response = await Client.BeginTransactionAsync(ProjectId, callSettings).ConfigureAwait(false);

            return(DatastoreTransaction.Create(Client, ProjectId, NamespaceId, response.Transaction));
        }
 /// <inheritdoc/>
 public override DatastoreTransaction BeginTransaction(CallSettings callSettings = null) =>
 DatastoreTransaction.Create(Client, ProjectId, NamespaceId, Client.BeginTransaction(ProjectId, callSettings).Transaction);