Ru.GameSchool.DataLayer.Repository.UserInfo.FixupNotifications C# (CSharp) Метод

FixupNotifications() приватный Метод

private FixupNotifications ( object sender, NotifyCollectionChangedEventArgs e ) : void
sender object
e System.Collections.Specialized.NotifyCollectionChangedEventArgs
Результат void
        private void FixupNotifications(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (e.NewItems != null)
            {
                foreach (Notification item in e.NewItems)
                {
                    item.UserInfo = this;
                }
            }
    
            if (e.OldItems != null)
            {
                foreach (Notification item in e.OldItems)
                {
                    if (ReferenceEquals(item.UserInfo, this))
                    {
                        item.UserInfo = null;
                    }
                }
            }
        }