NullNotificationManager.cs 2.0 KB

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