From 56235bf33677b49becc9f8680d41b5b02d75bcc6 Mon Sep 17 00:00:00 2001 From: BenjaminS <97973081+benjisho@users.noreply.github.com> Date: Wed, 31 May 2023 03:19:03 +0300 Subject: [PATCH] Add XML documentation comments to ToastNotificationService.cs This commit adds more XML documentation comments to the ToastNotificationService.cs file, improving the clarity and readability of the code. This change is purely cosmetic and does not affect the functionality of the code. --- .../ToastNotificationService.cs | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Greenshot.Plugin.Win10/ToastNotificationService.cs b/src/Greenshot.Plugin.Win10/ToastNotificationService.cs index b9120fee7..57f630734 100644 --- a/src/Greenshot.Plugin.Win10/ToastNotificationService.cs +++ b/src/Greenshot.Plugin.Win10/ToastNotificationService.cs @@ -42,7 +42,11 @@ namespace Greenshot.Plugin.Win10 private static readonly CoreConfiguration CoreConfiguration = IniConfig.GetIniSection(); private readonly string _imageFilePath; - + + /// + /// Initializes a new instance of the ToastNotificationService class. + /// If the program was started by a toast notification, logs this information. + /// public ToastNotificationService() { if (ToastNotificationManagerCompat.WasCurrentProcessToastActivated()) @@ -80,12 +84,12 @@ namespace Greenshot.Plugin.Win10 } /// - /// This creates the actual toast + /// Creates and displays the actual toast notification with the specified message and parameters. /// - /// string - /// TimeSpan until the toast timeouts - /// Action called when clicked - /// Action called when the toast is closed + /// The string message to display in the toast notification. + /// TimeSpan until the toast timeouts or should stay on screen, or null for the default duration. + /// Action called when clicked, or null for no action. + /// Action called when the toast is closed, or null for no action. private void ShowMessage(string message, TimeSpan? timeout = default, Action onClickAction = null, Action onClosedAction = null) { // Do not inform the user if this is disabled @@ -200,7 +204,7 @@ namespace Greenshot.Plugin.Win10 } /// - /// Factory method, helping with checking if the notification service is even available + /// Factory method, helping with checking if the notification service is even available - Creates a new instance of the ToastNotificationService class, if supported on the current system. /// /// ToastNotificationService public static ToastNotificationService Create() @@ -215,4 +219,4 @@ namespace Greenshot.Plugin.Win10 return null; } } -} \ No newline at end of file +}