internal void PrepareNotifications(Article article, string[] codes, bool disableNotifications = false)
 {
     Notifications = new Notification[0];
     ArticleIds    = new int[0];
     Articles      = new Article[0];
     ValidateCodes(codes);
     Codes = codes.Distinct().ToArray();
     if (!disableNotifications)
     {
         ContentId     = article.ContentId;
         SiteId        = article.Content.SiteId;
         Notifications = NotificationRepository.GetContentNotifications(ContentId, codes).ToArray();
         if (Notifications.Any())
         {
             Articles   = new[] { article };
             ArticleIds = new[] { article.Id };
         }
     }
 }
 internal void PrepareNotifications(int contentId, int[] articleIds, string[] codes, bool disableNotifications = false)
 {
     Notifications = new Notification[0];
     ArticleIds    = new int[0];
     Articles      = new Article[0];
     ValidateCodes(codes);
     Codes = codes.Distinct().ToArray();
     if (!disableNotifications)
     {
         ContentId     = contentId;
         SiteId        = ContentRepository.GetSiteId(contentId);
         Notifications = NotificationRepository.GetContentNotifications(contentId, codes).ToArray();
         if (Notifications.Any())
         {
             ArticleIds = articleIds;
             if (!Codes.Contains(NotificationCode.Create) && ServiceNotifications.Any())
             {
                 Articles = GetArticles();
             }
         }
     }
 }