public async Task RunQueryAsync2()
        {
            // Snippet: RunQueryAsync(string,PartitionId,ReadOptions,GqlQuery,CallSettings)
            // Additional: RunQueryAsync(string,PartitionId,ReadOptions,GqlQuery,CancellationToken)
            // Create client
            DatastoreClient datastoreClient = DatastoreClient.Create();
            // Initialize request argument(s)
            string      projectId   = "";
            PartitionId partitionId = new PartitionId();
            ReadOptions readOptions = new ReadOptions();
            GqlQuery    gqlQuery    = new GqlQuery();
            // Make the request
            RunQueryResponse response = await datastoreClient.RunQueryAsync(projectId, partitionId, readOptions, gqlQuery);

            // End snippet
        }
        public async Task RunQueryAsync_RequestObject()
        {
            // Snippet: RunQueryAsync(RunQueryRequest,CallSettings)
            // Create client
            DatastoreClient datastoreClient = await DatastoreClient.CreateAsync();

            // Initialize request argument(s)
            RunQueryRequest request = new RunQueryRequest
            {
                ProjectId   = "",
                PartitionId = new PartitionId(),
            };
            // Make the request
            RunQueryResponse response = await datastoreClient.RunQueryAsync(request);

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

            // Initialize request argument(s)
            RunQueryRequest request = new RunQueryRequest
            {
                ReadOptions = new ReadOptions(),
                PartitionId = new PartitionId(),
                Query       = new Query(),
                ProjectId   = "",
            };
            // Make the request
            RunQueryResponse response = await datastoreClient.RunQueryAsync(request);

            // End snippet
        }