Notify.cs 787 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace InABox.Core
  5. {
  6. public class Notify
  7. {
  8. public static Notifier? Notifier { get; set; }
  9. private Notify() { }
  10. public static void Push<TNotification>(TNotification notification) =>
  11. Notifier?.Push(notification);
  12. public static void Push<TNotification>(Guid session, TNotification notification) =>
  13. Notifier?.Push(session, notification);
  14. public static void PushUser<TNotification>(Guid userID, TNotification notification) =>
  15. Notifier?.PushUser(userID, notification);
  16. public static void Push<TNotification>(Platform platform, TNotification notification) =>
  17. Notifier?.Push(platform, notification);
  18. }
  19. }