예제 #1
0
        /// <summary>Snippet for DeleteContextAsync</summary>
        public async Task DeleteContextAsync()
        {
            // Snippet: DeleteContextAsync(string, CallSettings)
            // Additional: DeleteContextAsync(string, CancellationToken)
            // Create client
            ContextsClient contextsClient = await ContextsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/agent/sessions/[SESSION]/contexts/[CONTEXT]";
            // Make the request
            await contextsClient.DeleteContextAsync(name);

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

            // Initialize request argument(s)
            ContextName name = ContextName.FromProjectSessionContext("[PROJECT]", "[SESSION]", "[CONTEXT]");
            // Make the request
            await contextsClient.DeleteContextAsync(name);

            // End snippet
        }
예제 #3
0
        /// <summary>Snippet for DeleteContextAsync</summary>
        public async Task DeleteContextAsync_RequestObject()
        {
            // Snippet: DeleteContextAsync(DeleteContextRequest,CallSettings)
            // Additional: DeleteContextAsync(DeleteContextRequest,CancellationToken)
            // Create client
            ContextsClient contextsClient = await ContextsClient.CreateAsync();

            // Initialize request argument(s)
            DeleteContextRequest request = new DeleteContextRequest
            {
                ContextName = new ContextName("[PROJECT]", "[SESSION]", "[CONTEXT]"),
            };
            // Make the request
            await contextsClient.DeleteContextAsync(request);

            // End snippet
        }