forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(diags): Add ability for a diag view to send notifications
- Loading branch information
Showing
22 changed files
with
558 additions
and
136 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/Uno.Foundation/Diagnostics/DiagnosticViewNotification.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#nullable enable | ||
using System; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
|
||
namespace Uno.Diagnostics.UI; | ||
|
||
/// <summary> | ||
/// A notification sent by a diagnostic view to visually show an important status. | ||
/// </summary> | ||
/// <param name="content">The content of the notification.</param> | ||
/// <param name="duration">Configures the duration to wait before automatically hide the notification.</param> | ||
public class DiagnosticViewNotification(object content, TimeSpan? duration = null) | ||
{ | ||
[EditorBrowsable(EditorBrowsableState.Never)] // For XAML only | ||
public DiagnosticViewNotification() : this(default!) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// The content of the notification. | ||
/// </summary> | ||
public object Content { get; set; } = content; | ||
|
||
/// <summary> | ||
/// Configures the duration to wait before automatically hide the notification. | ||
/// </summary> | ||
public TimeSpan? Duration { get; set; } = duration; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.