コード例 #1
0
        public override int GetHashCode()
        {
            var partsHashCode  = Parts.Aggregate(0, (current, part) => current ^ part.GetHashCode());
            var pointsHashCode = Points.Aggregate(0, (current, point) => current ^ point.GetHashCode());

            return(BoundingBox.GetHashCode() ^ NumberOfParts.GetHashCode() ^ NumberOfPoints.GetHashCode()
                   ^ partsHashCode ^ pointsHashCode);
        }
コード例 #2
0
        public override T Aggregate <T>(Func <T, DocumentPart, T> f, T state)
        {
            T nstate = f(state, this);

            return(Parts.Aggregate(nstate, (st, part) => part.Aggregate(f, st)));
        }