Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
INotificationService.cs
1using System.Diagnostics.CodeAnalysis;
4
6{
10 [DefaultImplementation(typeof(NotificationService))]
12 {
18 void ExpectEvent<T>(DateTime Before)
19 where T : NotificationEvent;
20
26
33
38 Task DeleteEvents(params NotificationEvent[] Events);
39
46
53
59 SortedDictionary<CaseInsensitiveString, NotificationEvent[]> GetEventsByCategory(NotificationEventType Type);
60
67 SortedDictionary<CaseInsensitiveString, T[]> GetEventsByCategory<T>(NotificationEventType Type)
68 where T : NotificationEvent;
69
77 bool TryGetNotificationEvents(NotificationEventType Type, CaseInsensitiveString Category, [NotNullWhen(true)] out NotificationEvent[]? Events);
78
83
88
93
98
103
108
114 }
115}
Represents a case-insensitive string.
A service that can be loaded and unloaded at will. Typically during startup and shutdown of an applic...
Interface for event resolvers. Such can be used to resolve multiple pending notifications at once.
Task DeleteEvents(NotificationEventType Type, CaseInsensitiveString Category)
Deletes events for a given button and category.
int NrNotificationsContracts
Number of notifications but button Contracts
bool TryGetNotificationEvents(NotificationEventType Type, CaseInsensitiveString Category, [NotNullWhen(true)] out NotificationEvent[]? Events)
Tries to get available notification events.
NotificationEventHandler OnNewNotification
Event raised when a new notification has been logged.
Task NewEvent(NotificationEvent Event)
Registers a new event and notifies the user.
Task DeleteResolvedEvents(IEventResolver Resolver)
Deletes pending events that have already been resolved.
NotificationEventsHandler OnNotificationsDeleted
Event raised when notifications have been deleted.
int NrNotificationsThings
Number of notifications but button Things
int NrNotificationsWallet
Number of notifications but button Wallet
CaseInsensitiveString[] GetCategories(NotificationEventType Type)
Gets available categories for a button.
void ExpectEvent< T >(DateTime Before)
Registers a type of notification as expected.
SortedDictionary< CaseInsensitiveString, NotificationEvent[]> GetEventsByCategory(NotificationEventType Type)
Gets available notification events for a button, sorted by category.
int NrNotificationsContacts
Number of notifications but button Contacts
NotificationEvent[] GetEvents(NotificationEventType Type)
Gets available notification events for a button.
SortedDictionary< CaseInsensitiveString, T[]> GetEventsByCategory< T >(NotificationEventType Type)
Gets available notification events for a button, of a given type, sorted by category.
Task DeleteEvents(params NotificationEvent[] Events)
Deletes a specified set of events.
abstract class NotificationEvent()
Abstract base class of notification events.
delegate void NotificationEventHandler(object? Sender, NotificationEventArgs e)
Delegate for notification event handlers.
NotificationEventType
Button on which event is to be displayed.
delegate void NotificationEventsHandler(object? Sender, NotificationEventsArgs e)
Delegate for notification events handlers.