Exemplo n.º 1
0
        public void NotifyForumUpdate(Forum forum)
        {
            _timeFormattingService.Init(null);
            var context = GlobalHost.ConnectionManager.GetHubContext <Forums>();

            context.Clients.All.notifyForumUpdate(new { forum.ForumID, TopicCount = forum.TopicCount.ToString("N0"), PostCount = forum.PostCount.ToString("N0"), LastPostTime = _timeFormattingService.GetFormattedTime(forum.LastPostTime), forum.LastPostName, Utc = forum.LastPostTime.ToString("o"), Image = "NewIndicator.png" });
        }
Exemplo n.º 2
0
        public void NotifyForumUpdate(Forum forum)
        {
            var tenant = _tenantService.GetTenant();

            _forumsHubContext.Clients.Group($"{tenant}:all").SendAsync("notifyForumUpdate", new { forum.ForumID, TopicCount = forum.TopicCount.ToString("N0"), PostCount = forum.PostCount.ToString("N0"), LastPostTime = _timeFormattingService.GetFormattedTime(forum.LastPostTime, null), forum.LastPostName, Utc = forum.LastPostTime.ToString("o") });
        }
Exemplo n.º 3
0
 public void NotifyForumUpdate(Forum forum)
 {
     _forumsHubContext.Clients.All.SendAsync("notifyForumUpdate", new { forum.ForumID, TopicCount = forum.TopicCount.ToString("N0"), PostCount = forum.PostCount.ToString("N0"), LastPostTime = _timeFormattingService.GetFormattedTime(forum.LastPostTime, null), forum.LastPostName, Utc = forum.LastPostTime.ToString("o"), Image = "NewIndicator.png" });
 }