Esempio n. 1
0
        /// <summary>Snippet for ReserveIdsAsync</summary>
        public async Task ReserveIdsAsync()
        {
            // Snippet: ReserveIdsAsync(string, IEnumerable<Key>, CallSettings)
            // Additional: ReserveIdsAsync(string, IEnumerable<Key>, CancellationToken)
            // Create client
            DatastoreClient datastoreClient = await DatastoreClient.CreateAsync();

            // Initialize request argument(s)
            string            projectId = "";
            IEnumerable <Key> keys      = new Key[] { new Key(), };
            // Make the request
            ReserveIdsResponse response = await datastoreClient.ReserveIdsAsync(projectId, keys);

            // End snippet
        }
Esempio n. 2
0
        /// <summary>Snippet for ReserveIdsAsync</summary>
        public async Task ReserveIdsAsync_RequestObject()
        {
            // Snippet: ReserveIdsAsync(ReserveIdsRequest,CallSettings)
            // Create client
            DatastoreClient datastoreClient = await DatastoreClient.CreateAsync();

            // Initialize request argument(s)
            ReserveIdsRequest request = new ReserveIdsRequest
            {
                ProjectId = "",
                Keys      = { },
            };
            // Make the request
            ReserveIdsResponse response = await datastoreClient.ReserveIdsAsync(request);

            // End snippet
        }
Esempio n. 3
0
        /// <summary>Snippet for ReserveIdsAsync</summary>
        public async Task ReserveIdsRequestObjectAsync()
        {
            // Snippet: ReserveIdsAsync(ReserveIdsRequest, CallSettings)
            // Additional: ReserveIdsAsync(ReserveIdsRequest, CancellationToken)
            // Create client
            DatastoreClient datastoreClient = await DatastoreClient.CreateAsync();

            // Initialize request argument(s)
            ReserveIdsRequest request = new ReserveIdsRequest
            {
                Keys       = { new Key(), },
                ProjectId  = "",
                DatabaseId = "",
            };
            // Make the request
            ReserveIdsResponse response = await datastoreClient.ReserveIdsAsync(request);

            // End snippet
        }