public void TestCollectInto() { ICollection <object> values = new List <object>(); var v = new XYPointMultiType(10, 20, "X"); v.CollectInto(values); Assert.AreEqual("X", Join(values)); values.Clear(); v.AddSingleValue("Y"); v.CollectInto(values); Assert.AreEqual("X,Y", Join(values)); }
private static ICollection<object> Visit( XYPointMultiType point, double x, double y, double width, double height, ICollection<object> result) { if (!BoundingBox.ContainsPoint(x, y, width, height, point.X, point.Y)) { return result; } if (result == null) { result = new ArrayDeque<object>(4); } point.CollectInto(result); return result; }