Пример #1
0
        private static void sessionStatusDispatcher_Tick(object sender, ElapsedEventArgs e)
        {
            var evnt = new EventsArgs.OnSessionStatisticsEventArgs(_torrentSession.status());

            // notify web
            if (webServer != null)
            {
                var context = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext <www.SignalRHub>();
                context.Clients.All.notifySessionStatistics(evnt);
            }

            // invoke event
            SessionStatisticsUpdate?.Invoke(null, evnt);
        }
Пример #2
0
        private static void sessionStatusDispatcher_Tick(object sender, ElapsedEventArgs e)
        {
            var evnt = new EventsArgs.OnSessionStatisticsEventArgs(_torrentSession.status());

            // notify web
            if (webServer != null)
            {
                var context = Microsoft.AspNet.SignalR.GlobalHost.ConnectionManager.GetHubContext<www.SignalRHub>();
                context.Clients.All.notifySessionStatistics(evnt);
            }

            // invoke event
            SessionStatisticsUpdate?.Invoke(null, evnt);
        }