2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-07-01 16:33:43 -04:00

[Herald+Core] Send notifications to plugins during read-all in Debug (#136)

This will allow notifications to be sent to Notification listeners during read-all to enhance testability.

This is controlled by the `DEBUG` compiler directive, so Release versions will not have this behaviour.

However, Herald, being a plugin itself, should ignore these otherwise the results are.... unfortunate. #askmehowiknow
This commit is contained in:
F K
2024-01-29 15:36:03 -05:00
committed by GitHub
parent ad1df66379
commit a555c86083
2 changed files with 15 additions and 0 deletions

View File

@ -46,13 +46,22 @@ namespace Observatory.PluginManagement
{
var guid = Guid.Empty;
#if DEBUG // For exercising testing notifier plugins in read-all
if (notificationArgs.Rendering.HasFlag(NotificationRendering.PluginNotifier))
{
var handler = Notification;
handler?.Invoke(this, notificationArgs);
}
#endif
if (!IsLogMonitorBatchReading)
{
#if !DEBUG
if (notificationArgs.Rendering.HasFlag(NotificationRendering.PluginNotifier))
{
var handler = Notification;
handler?.Invoke(this, notificationArgs);
}
#endif
if (!OverridePopup && Properties.Core.Default.NativeNotify && notificationArgs.Rendering.HasFlag(NotificationRendering.NativeVisual))
{