NullNotificationManager.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using System.Threading.Tasks;
  2. using Abp;
  3. using Abp.Notifications;
  4. namespace WeOnlineApp.CommonManager.Notifications
  5. {
  6. public sealed class NullNotificationManager : INotificationManager
  7. {
  8. public static NullNotificationManager Instance { get; } = new NullNotificationManager();
  9. public Task WelcomeToSystemAsync()
  10. {
  11. return Task.CompletedTask;
  12. }
  13. public Task SendMsgAsync(UserIdentifier user, string message)
  14. {
  15. return Task.CompletedTask;
  16. }
  17. public Task SendMsgAsync(UserIdentifier user, string message, NotificationSeverity severity)
  18. {
  19. return Task.CompletedTask;
  20. }
  21. public Task SendMsgAsync(string msgName, string message)
  22. {
  23. return Task.CompletedTask;
  24. }
  25. public Task SendMsgAsync(string msgName, string message, NotificationSeverity severity)
  26. {
  27. return Task.CompletedTask;
  28. }
  29. public Task SendMessageAsync(UserIdentifier user, string msgName, SendMsgNotificationData data, NotificationSeverity severity)
  30. {
  31. return Task.CompletedTask;
  32. }
  33. public Task SendMessageAsync(string msgName, SendMsgNotificationData data, NotificationSeverity severity)
  34. {
  35. return Task.CompletedTask;
  36. }
  37. public Task SendMessageAsync(UserIdentifier user, string message, NotificationSeverity severity = NotificationSeverity.Info)
  38. {
  39. return Task.CompletedTask;
  40. }
  41. public Task SendMessageAsync(string msgName, string message, NotificationSeverity severity = NotificationSeverity.Info)
  42. {
  43. return Task.CompletedTask;
  44. }
  45. }
  46. }