< Summary

Information
Class: MyNet.UI.Notifications.Models.ActionNotification
Assembly: MyNet.UI
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/Notifications/Models/ActionNotification.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 29
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/Notifications/Models/ActionNotification.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ActionNotification.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8
 9namespace 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>
 1522public 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