Ru.GameSchool.DataLayer.Repository.Course.FixupPoints C# (CSharp) Méthode

FixupPoints() private méthode

private FixupPoints ( object sender, NotifyCollectionChangedEventArgs e ) : void
sender object
e System.Collections.Specialized.NotifyCollectionChangedEventArgs
Résultat void
        private void FixupPoints(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (e.NewItems != null)
            {
                foreach (Point item in e.NewItems)
                {
                    item.Course = this;
                }
            }
    
            if (e.OldItems != null)
            {
                foreach (Point item in e.OldItems)
                {
                    if (ReferenceEquals(item.Course, this))
                    {
                        item.Course = null;
                    }
                }
            }
        }