BackgroundTaskComponent.ToastNotificationBackgroundTask.HandleReply C# (CSharp) Method

HandleReply() private method

private HandleReply ( ToastNotificationActionTriggerDetail details, QueryString args ) : System.Threading.Tasks.Task
details ToastNotificationActionTriggerDetail
args QueryString
return System.Threading.Tasks.Task
        private async Task HandleReply(ToastNotificationActionTriggerDetail details, QueryString args)
        {
            // Get the conversation the toast is about
            int conversationId = int.Parse(args["conversationId"]);

            // Get the message that the user typed in the toast
            string message = (string)details.UserInput["tbReply"];

            // In a real app, this would be making a web request, sending the new message
            await Task.Delay(TimeSpan.FromSeconds(2.3));

            // In a real app, you most likely should NOT notify your user that the request completed (only notify them if there's an error)
            SendToast("Your message has been sent! Your message: " + message);
        }
ToastNotificationBackgroundTask