Example #1
0
        /// <summary>Snippet for GetNotificationChannelAsync</summary>
        public async Task GetNotificationChannelAsync()
        {
            // Snippet: GetNotificationChannelAsync(NotificationChannelName,CallSettings)
            // Additional: GetNotificationChannelAsync(NotificationChannelName,CancellationToken)
            // Create client
            NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();

            // Initialize request argument(s)
            NotificationChannelName name = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]");
            // Make the request
            NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(name);

            // End snippet
        }
Example #2
0
        /// <summary>Snippet for GetNotificationChannelAsync</summary>
        public async Task GetNotificationChannelAsync_RequestObject()
        {
            // Snippet: GetNotificationChannelAsync(GetNotificationChannelRequest,CallSettings)
            // Create client
            NotificationChannelServiceClient notificationChannelServiceClient = await NotificationChannelServiceClient.CreateAsync();

            // Initialize request argument(s)
            GetNotificationChannelRequest request = new GetNotificationChannelRequest
            {
                NotificationChannelName = new NotificationChannelName("[PROJECT]", "[NOTIFICATION_CHANNEL]"),
            };
            // Make the request
            NotificationChannel response = await notificationChannelServiceClient.GetNotificationChannelAsync(request);

            // End snippet
        }