protected override void OnDetaching() { var source = AssociatedObject; var convexHull = ConvexHullService.GetConvexHull(source); if (convexHull is INotifyCollectionChanged notifySource) { notifySource.CollectionChanged -= OnConvexHullChanged; } searcher = null; }
protected override void OnAttached() { var source = AssociatedObject; var convexHull = ConvexHullService.GetConvexHull(source); if (convexHull is INotifyCollectionChanged notifySource) { notifySource.CollectionChanged += OnConvexHullChanged; } searcher = new FarthestPairSearcher(convexHull); }
public ConvexHullBuilder(ConvexHullService host) { this.host = host ?? throw new ArgumentNullException(nameof(host)); }