Example #1
0
        /// <summary>Snippet for DeleteAllContextsAsync</summary>
        public async Task DeleteAllContextsResourceNamesAsync()
        {
            // Snippet: DeleteAllContextsAsync(SessionName, CallSettings)
            // Additional: DeleteAllContextsAsync(SessionName, CancellationToken)
            // Create client
            ContextsClient contextsClient = await ContextsClient.CreateAsync();

            // Initialize request argument(s)
            SessionName parent = SessionName.FromProjectSession("[PROJECT]", "[SESSION]");
            // Make the request
            await contextsClient.DeleteAllContextsAsync(parent);

            // End snippet
        }
Example #2
0
        /// <summary>Snippet for DeleteAllContextsAsync</summary>
        public async Task DeleteAllContextsAsync()
        {
            // Snippet: DeleteAllContextsAsync(string, CallSettings)
            // Additional: DeleteAllContextsAsync(string, CancellationToken)
            // Create client
            ContextsClient contextsClient = await ContextsClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]/agent/sessions/[SESSION]";
            // Make the request
            await contextsClient.DeleteAllContextsAsync(parent);

            // End snippet
        }
Example #3
0
        /// <summary>Snippet for DeleteAllContextsAsync</summary>
        public async Task DeleteAllContextsRequestObjectAsync()
        {
            // Snippet: DeleteAllContextsAsync(DeleteAllContextsRequest, CallSettings)
            // Additional: DeleteAllContextsAsync(DeleteAllContextsRequest, CancellationToken)
            // Create client
            ContextsClient contextsClient = await ContextsClient.CreateAsync();

            // Initialize request argument(s)
            DeleteAllContextsRequest request = new DeleteAllContextsRequest {
                Parent = "",
            };
            // Make the request
            await contextsClient.DeleteAllContextsAsync(request);

            // End snippet
        }
Example #4
0
        /// <summary>Snippet for DeleteAllContextsAsync</summary>
        public async Task DeleteAllContextsRequestObjectAsync()
        {
            // Snippet: DeleteAllContextsAsync(DeleteAllContextsRequest, CallSettings)
            // Additional: DeleteAllContextsAsync(DeleteAllContextsRequest, CancellationToken)
            // Create client
            ContextsClient contextsClient = await ContextsClient.CreateAsync();

            // Initialize request argument(s)
            DeleteAllContextsRequest request = new DeleteAllContextsRequest
            {
                ParentAsSessionName = SessionName.FromProjectSession("[PROJECT]", "[SESSION]"),
            };
            // Make the request
            await contextsClient.DeleteAllContextsAsync(request);

            // End snippet
        }
        private Task DeleteAllContextsInternalAsync(string sessionId, string projectId, ContextsClient client)
        {
            var session = CreateSession(projectId, sessionId);

            return(client.DeleteAllContextsAsync(session));
        }