-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from 1nf0rmagician/update/NotificationPublish…
…erAPI Extend NotificationPublisher API
- Loading branch information
Showing
4 changed files
with
129 additions
and
38 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) 2022, Phoenix Contact GmbH & Co. KG | ||
// Licensed under the Apache License, Version 2.0 | ||
|
||
using System; | ||
|
||
namespace Moryx.Notifications | ||
{ | ||
/// <summary> | ||
/// Notification publisher facade | ||
/// </summary> | ||
public interface INotificationPublisherExtended | ||
{ | ||
/// <summary> | ||
/// Returns all active notifications | ||
/// </summary> | ||
Notification[] GetAll(); | ||
|
||
/// <summary> | ||
/// Gets a <see cref="Notification"/> corresponding to a specific <paramref name="id"/> | ||
/// If this is an inactive <see cref="Notification"/>, than the NotificationHistory will be used to search for the asked <see cref="Notification"/> | ||
/// </summary> | ||
/// <param name="id">Id of the desired <see cref="Notification"/></param> | ||
/// <returns>A <see cref="Notification"/> correspodning to the given id if it exists; null otherwise</returns> | ||
Notification Get(Guid id); | ||
|
||
/// <summary> | ||
/// Acknowledge the given Notificatione | ||
/// </summary> | ||
/// <param name="notification">The notification to be acknowledged</param> | ||
void Acknowledge(Notification notification); | ||
|
||
/// <summary> | ||
/// Raised if notification was published | ||
/// </summary> | ||
event EventHandler<Notification> Published; | ||
|
||
/// <summary> | ||
/// Raised if notification was acknowledged | ||
/// </summary> | ||
event EventHandler<Notification> Acknowledged; | ||
} | ||
} |
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