Example #1
0
        private void CheckContributors()
        {
            List <UserListContainer> oldList = contributors;
            List <UserListContainer> newList = GetContributors();

            if (UserListDiff(oldList, newList, out List <UserListContainer> added, out List <UserListContainer> removed,
                             (UseCache.Contains("contributors") ? MonitoringCache["contributors"] : null)))
            {
                // Add the new entries to the appropriate cache, if enabled.  --Kris
                if (UseCache.Contains("contributors"))
                {
                    foreach (UserListContainer ulc in added)
                    {
                        foreach (UserListChild child in ulc.Data.Children)
                        {
                            MonitoringCache["contributors"].Add(child.Id);
                        }
                    }
                }

                // Event handler to alert the calling app that the list has changed.  --Kris
                LiveThreadContributorsUpdateEventArgs args = new LiveThreadContributorsUpdateEventArgs
                {
                    OldContributors = oldList,
                    NewContributors = newList,
                    Added           = added,
                    Removed         = removed
                };
                OnContributorsUpdated(args);
            }
        }
Example #2
0
        private void CheckContributors()
        {
            List <UserListContainer> oldList = contributors;
            List <UserListContainer> newList = GetContributors();

            if (UserListDiff(oldList, newList, out List <UserListContainer> added, out List <UserListContainer> removed))
            {
                // Event handler to alert the calling app that the list has changed.  --Kris
                LiveThreadContributorsUpdateEventArgs args = new LiveThreadContributorsUpdateEventArgs
                {
                    OldContributors = oldList,
                    NewContributors = newList,
                    Added           = added,
                    Removed         = removed
                };
                OnContributorsUpdated(args);
            }
        }
Example #3
0
 protected virtual void OnContributorsUpdated(LiveThreadContributorsUpdateEventArgs e)
 {
     ContributorsUpdated?.Invoke(this, e);
 }
Example #4
0
 private void C_LiveThreadContributorsUpdated(object sender, LiveThreadContributorsUpdateEventArgs e)
 {
     Assert.IsTrue(e.Added.Count > 0);
     LiveThreadContributorsUpdated = true;
 }