BackgroundTaskComponent.ToastNotificationBackgroundTask.HandleLike C# (CSharp) Method

HandleLike() private method

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

            // In a real app, this would be making a web request, sending the like command
            await Task.Delay(TimeSpan.FromSeconds(1.1));

            // 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 like has been sent!");
        }
ToastNotificationBackgroundTask