コード例 #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" });
        }
コード例 #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") });
        }
コード例 #3
0
ファイル: Broker.cs プロジェクト: troydalldorf/POPForums
 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" });
 }