using System.Collections.Generic; using Microsoft.Msagl.Core.Geometry; namespace Microsoft.Msagl.Routing.Rectilinear.Nudging{ internal class PointByDelegateComparer : IComparer{ PointProjection projection; public PointByDelegateComparer(PointProjection projection){ this.projection = projection; } /// /// Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. /// /// /// Value /// Condition /// Less than zero /// is less than . /// Zero /// equals . /// Greater than zero /// is greater than . /// /// The first object to compare. /// The second object to compare. /// public int Compare(Point x, Point y){ return projection(x).CompareTo(projection(y)); } } }