Browse Source

Renamed notify to push

Kenric Nugteren 2 năm trước cách đây
mục cha
commit
3afd6fa557

+ 1 - 1
prs.desktop/MainWindow.xaml.cs

@@ -142,7 +142,7 @@ namespace PRSDesktop
             NotificationsWatchDog.Tick += Notifications_Tick;
             NotificationsWatchDog.Interval = new TimeSpan(0, 2, 0);
 
-            ClientFactory.Notifications.AddHandler<Notification>(ReceiveNotification);
+            ClientFactory.PushHandlers.AddHandler<Notification>(ReceiveNotification);
             ClientFactory.RegisterMailer(EmailType.IMAP, typeof(IMAPMailer));
             ClientFactory.RegisterMailer(EmailType.Exchange, typeof(ExchangeMailer));
             ClientFactory.OnLog += (type, userid, message, parameters) =>  Logger.Send(LogType.Information, ClientFactory.UserID, message, parameters);

+ 5 - 5
prs.server/Engines/Database/DatabaseEngine.cs

@@ -133,9 +133,9 @@ namespace PRSServer
                 )).Rows.Select(x => x.ToObject<Notification>());
         }
 
-        private void ConfigureNotifier()
+        private void ConfigurePusher()
         {
-            Notify.AddPollHandler(PollNotifications);
+            PushManager.AddPollHandler(PollNotifications);
         }
 
         public override void Run()
@@ -218,7 +218,7 @@ namespace PRSServer
             _socketserver = new RpcServer<RpcServerSocketTransport>(sockettransport);
             _socketserver.OnLog += (type, userid, message, parameters) => Logger.Send(type, userid, $"[S] {message}", parameters);
             _socketserver.Start();
-            Notify.AddNotifier(sockettransport);
+            PushManager.AddPusher(sockettransport);
 
             Logger.Send(LogType.Information, "", string.Format("Server started listening on port {0}", Properties.Port));
 
@@ -230,11 +230,11 @@ namespace PRSServer
             _pipeserver = new RpcServer<RpcServerPipeTransport>(pipetransport);
             _pipeserver.OnLog += (type, userid, message, parameters) => Logger.Send(type, userid, $"[P] {message}", parameters);
             _pipeserver.Start();
-            Notify.AddNotifier(pipetransport);
+            PushManager.AddPusher(pipetransport);
 
             Logger.Send(LogType.Information, "", "Pipe Listener started");
             
-            ConfigureNotifier();
+            ConfigurePusher();
 
         }
 

+ 1 - 1
prs.stores/NotificationStore.cs

@@ -21,7 +21,7 @@ namespace PRSStores
                     new Columns<Employee>(x => x.UserLink.ID)).Rows.FirstOrDefault()?.Get<Employee, Guid>(x => x.UserLink.ID);
                 if (userID.HasValue)
                 {
-                    Notify.PushUser(userID.Value, entity);
+                    PushManager.PushUser(userID.Value, entity);
                 }
             }
         }