Index: Core/Components/src/Core.Components.Gis/Data/MapLineData.cs
===================================================================
diff -u -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 -rde487d5fcb46b012427e0e0ea85305e6cf01a3f0
--- Core/Components/src/Core.Components.Gis/Data/MapLineData.cs (.../MapLineData.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3)
+++ Core/Components/src/Core.Components.Gis/Data/MapLineData.cs (.../MapLineData.cs) (revision de487d5fcb46b012427e0e0ea85305e6cf01a3f0)
@@ -34,18 +34,19 @@
///
public class MapLineData : FeatureBasedMapData
{
+ private static readonly LineStyle defaultLineStyle = new LineStyle {
+ Color = Color.Black,
+ Width = 2,
+ DashStyle = DashStyle.Solid
+ };
+
///
/// Creates a new instance of with default styling.
///
/// The name of the .
/// Thrown when is
/// null or only whitespace.
- public MapLineData(string name)
- : this(name, new LineStyle {
- Color = Color.Black,
- Width = 2,
- DashStyle = DashStyle.Solid
- }) {}
+ public MapLineData(string name) : this(name, defaultLineStyle) {}
///
/// Creates a new instance of .
Index: Core/Components/src/Core.Components.Gis/Data/MapPointData.cs
===================================================================
diff -u -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 -rde487d5fcb46b012427e0e0ea85305e6cf01a3f0
--- Core/Components/src/Core.Components.Gis/Data/MapPointData.cs (.../MapPointData.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3)
+++ Core/Components/src/Core.Components.Gis/Data/MapPointData.cs (.../MapPointData.cs) (revision de487d5fcb46b012427e0e0ea85305e6cf01a3f0)
@@ -33,21 +33,22 @@
///
public class MapPointData : FeatureBasedMapData
{
+ private static readonly PointStyle defaultPointStyle = new PointStyle
+ {
+ Color = Color.Black,
+ Size = 2,
+ Symbol = PointSymbol.Square,
+ StrokeColor = Color.Black,
+ StrokeThickness = 1
+ };
+
///
/// Creates a new instance of with default styling.
///
/// The name of the .
/// Thrown when is
/// null or only whitespace.
- public MapPointData(string name)
- : this(name, new PointStyle
- {
- Color = Color.Black,
- Size = 2,
- Symbol = PointSymbol.Square,
- StrokeColor = Color.Black,
- StrokeThickness = 1
- }) {}
+ public MapPointData(string name) : this(name, defaultPointStyle) {}
///
/// Creates a new instance of .
Index: Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs
===================================================================
diff -u -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 -rde487d5fcb46b012427e0e0ea85305e6cf01a3f0
--- Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs (.../MapPolygonData.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3)
+++ Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs (.../MapPolygonData.cs) (revision de487d5fcb46b012427e0e0ea85305e6cf01a3f0)
@@ -33,19 +33,20 @@
///
public class MapPolygonData : FeatureBasedMapData
{
+ private static readonly PolygonStyle defaultPolygonStyle = new PolygonStyle
+ {
+ FillColor = Color.DarkGray,
+ StrokeColor = Color.Black,
+ StrokeThickness = 2
+ };
+
///
/// Creates a new instance of with default styling.
///
/// The name of the .
/// Thrown when is
/// null or only whitespace.
- public MapPolygonData(string name)
- : this(name, new PolygonStyle
- {
- FillColor = Color.DarkGray,
- StrokeColor = Color.Black,
- StrokeThickness = 2
- }) {}
+ public MapPolygonData(string name) : this(name, defaultPolygonStyle) {}
///
/// Creates a new instance of .