public static GeometryData Parse(XElement xElement) { GeometryData res = null; switch (xElement.Name.LocalName) { case "path": res = new PathData(xElement); break; case "rect": res = new RectangleData(xElement); break; case "circle": res = new CircleData(xElement); break; case "ellipse": res = new EllipseData(xElement); break; case "line": res = new LineData(xElement); break; case "polyline": break; case "polygon": res = new PolygonData(xElement); break; } return res; }
public static GeometryData Parse(XElement xElement) { GeometryData res = null; switch (xElement.Name.LocalName) { case "path": res = new PathData(xElement); break; case "rect": res = new RectangleData(xElement); break; case "circle": res = new CircleData(xElement); break; case "ellipse": res = new EllipseData(xElement); break; case "line": res = new LineData(xElement); break; case "polyline": break; case "polygon": res = new PolygonData(xElement); break; } return(res); }