Skip to content

Commit 3afefe0

Browse files
author
anbare
committed
Added some comments
1 parent 2c7ee9e commit 3afefe0

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

BackgroundTaskComponent/ToastNotificationBackgroundTask.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public async void Run(IBackgroundTaskInstance taskInstance)
5050
}
5151

5252
// Otherwise handle other background activations
53+
else
54+
throw new NotImplementedException();
5355
}
5456

5557
finally
@@ -86,6 +88,10 @@ private async Task HandleLike(ToastNotificationActionTriggerDetail details, Quer
8688
SendToast("Your like has been sent!");
8789
}
8890

91+
/// <summary>
92+
/// Simple method to show a basic toast with a message.
93+
/// </summary>
94+
/// <param name="message"></param>
8995
private void SendToast(string message)
9096
{
9197
ToastContent content = new ToastContent()

Quickstart-Sending-Local-Toast/App.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,18 @@ protected override async void OnLaunched(LaunchActivatedEventArgs e)
4949
await OnLaunchedOrActivated(e);
5050
}
5151

52+
/// <summary>
53+
/// Invoked when the application is activated by some means other than normal launching.
54+
/// </summary>
55+
/// <param name="e">Event data for the event.</param>
5256
protected override async void OnActivated(IActivatedEventArgs e)
5357
{
5458
await OnLaunchedOrActivated(e);
5559
}
5660

5761
private async Task OnLaunchedOrActivated(IActivatedEventArgs e)
5862
{
59-
// Initialize required items before the app is loaded
63+
// Initialize things like registering background task before the app is loaded
6064
await InitializeApp();
6165

6266
#if DEBUG

Quickstart-Sending-Local-Toast/MainPage.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ private void ButtonSendToast_Click(object sender, RoutedEventArgs e)
2727
string logo = "ms-appdata:///local/Andrew.jpg";
2828
string conversationId = "384928";
2929

30+
// Construct the visuals of the toast
3031
ToastVisual visual = new ToastVisual()
3132
{
3233
TitleText = new ToastText()
@@ -54,6 +55,7 @@ private void ButtonSendToast_Click(object sender, RoutedEventArgs e)
5455
}
5556
};
5657

58+
// Construct the actions for the toast (inputs and buttons)
5759
ToastActionsCustom actions = new ToastActionsCustom()
5860
{
5961
Inputs =

0 commit comments

Comments
 (0)