| | | 1 | | // ----------------------------------------------------------------------- |
| | | 2 | | // <copyright file="ActionNotification.cs" company="Stéphane ANDRE"> |
| | | 3 | | // Copyright (c) Stéphane ANDRE. All rights reserved. |
| | | 4 | | // </copyright> |
| | | 5 | | // ----------------------------------------------------------------------- |
| | | 6 | | |
| | | 7 | | using System; |
| | | 8 | | |
| | | 9 | | namespace MyNet.UI.Notifications.Models; |
| | | 10 | | |
| | | 11 | | /// <summary> |
| | | 12 | | /// Represents a closable notification with an associated action to execute. |
| | | 13 | | /// </summary> |
| | | 14 | | /// <remarks> |
| | | 15 | | /// Initializes a new instance of the <see cref="ActionNotification"/> class. |
| | | 16 | | /// </remarks> |
| | | 17 | | /// <param name="message">The message content.</param> |
| | | 18 | | /// <param name="title">The title of the notification.</param> |
| | | 19 | | /// <param name="severity">The severity of the notification.</param> |
| | | 20 | | /// <param name="isClosable">Indicates whether the notification can be closed.</param> |
| | | 21 | | /// <param name="action">The action to execute when the notification is triggered.</param> |
| | 15 | 22 | | public class ActionNotification(string message, string title, NotificationSeverity severity, bool isClosable = true, Act |
| | | 23 | | { |
| | | 24 | | /// <summary> |
| | | 25 | | /// Gets the action to execute when the notification is triggered. |
| | | 26 | | /// </summary> |
| | | 27 | | public Action<INotification>? Action { get; } = action; |
| | | 28 | | } |
| | | 29 | | |