1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-29 11:25:26 +00:00
Radarr/NzbDrone.Core/Providers/NotificationProvider.cs
2011-11-20 20:43:16 -08:00

27 lines
No EOL
697 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Core.Model.Notification;
namespace NzbDrone.Core.Providers
{
public class NotificationProvider
{
private static ProgressNotification _currentNotification;
public virtual ProgressNotification GetCurrent()
{
if (_currentNotification == null || _currentNotification.CompletedTime < DateTime.Now.AddSeconds(-3))
{
return null;
}
return _currentNotification;
}
public virtual void Register(ProgressNotification notification)
{
_currentNotification = notification;
}
}
}