public ForumPartHandler(IWorkContextAccessor workContextAccessor, IWaveNotificationWrapper waveNotificationWrapper) { _workContextAccessor = workContextAccessor; _waveNotificationWrapper = waveNotificationWrapper; OnPublished <PostPart>((context, postPart) => { if (!postPart.IsParentThread()) { return; } var threadPart = postPart.ThreadPart; var forumPart = threadPart.ForumPart; var workContext = _workContextAccessor.GetContext(); var location = new UrlHelper(workContext.HttpContext.Request.RequestContext).ThreadView(threadPart); _waveNotificationWrapper.NotifyThreadCreated(forumPart.Id, threadPart.Id, postPart.Id, location); }); OnRemoved <ThreadPart>((context, threadPart) => { var forumPart = threadPart.ForumPart; _waveNotificationWrapper.NotifyThreadRemoved(forumPart.Id, threadPart.Id); }); }
public PostPartHandler(IWaveNotificationWrapper waveNotificationWrapper) { _waveNotificationWrapper = waveNotificationWrapper; OnRemoved<PostPart>((context, postPart) => { if (postPart.IsParentThread()) return; var threadPart = postPart.ThreadPart; var forumPart = threadPart.ForumPart; _waveNotificationWrapper.NotifyPostRemoved(forumPart.Id, threadPart.Id, postPart.Id); }); }
public PostPartHandler(IWaveNotificationWrapper waveNotificationWrapper) { _waveNotificationWrapper = waveNotificationWrapper; OnRemoved <PostPart>((context, postPart) => { if (postPart.IsParentThread()) { return; } var threadPart = postPart.ThreadPart; var forumPart = threadPart.ForumPart; _waveNotificationWrapper.NotifyPostRemoved(forumPart.Id, threadPart.Id, postPart.Id); }); }
public ThreadPartHandler(IWorkContextAccessor workContextAccessor, IWaveNotificationWrapper waveNotificationWrapper) { _workContextAccessor = workContextAccessor; _waveNotificationWrapper = waveNotificationWrapper; OnPublished<PostPart>((context, postPart) => { if (postPart.IsParentThread()) return; var threadPart = postPart.ThreadPart; var forumPart = threadPart.ForumPart; var workContext = _workContextAccessor.GetContext(); var location = new UrlHelper(workContext.HttpContext.Request.RequestContext).PostView(postPart); _waveNotificationWrapper.NotifyPostCreated(threadPart.Id, forumPart.Id, threadPart.Id, postPart.Id, postPart.RepliedOn.Value, location, postPart.Text); _waveNotificationWrapper.NotifyPostCreated(forumPart.Id, forumPart.Id, threadPart.Id, postPart.Id, postPart.RepliedOn.Value, location, postPart.Text); }); }
public ThreadPartHandler(IWorkContextAccessor workContextAccessor, IWaveNotificationWrapper waveNotificationWrapper) { _workContextAccessor = workContextAccessor; _waveNotificationWrapper = waveNotificationWrapper; OnPublished <PostPart>((context, postPart) => { if (postPart.IsParentThread()) { return; } var threadPart = postPart.ThreadPart; var forumPart = threadPart.ForumPart; var workContext = _workContextAccessor.GetContext(); var location = new UrlHelper(workContext.HttpContext.Request.RequestContext).PostView(postPart); _waveNotificationWrapper.NotifyPostCreated(threadPart.Id, forumPart.Id, threadPart.Id, postPart.Id, postPart.RepliedOn.Value, location, postPart.Text); _waveNotificationWrapper.NotifyPostCreated(forumPart.Id, forumPart.Id, threadPart.Id, postPart.Id, postPart.RepliedOn.Value, location, postPart.Text); }); }
public ForumPartHandler(IWorkContextAccessor workContextAccessor, IWaveNotificationWrapper waveNotificationWrapper) { _workContextAccessor = workContextAccessor; _waveNotificationWrapper = waveNotificationWrapper; OnPublished<PostPart>((context, postPart) => { if (!postPart.IsParentThread()) return; var threadPart = postPart.ThreadPart; var forumPart = threadPart.ForumPart; var workContext = _workContextAccessor.GetContext(); var location = new UrlHelper(workContext.HttpContext.Request.RequestContext).ThreadView(threadPart); _waveNotificationWrapper.NotifyThreadCreated(forumPart.Id, threadPart.Id, postPart.Id, location); }); OnRemoved<ThreadPart>((context, threadPart) => { var forumPart = threadPart.ForumPart; _waveNotificationWrapper.NotifyThreadRemoved(forumPart.Id, threadPart.Id); }); }