Index: Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs
===================================================================
diff -u -rcfc35ba7d39c3a60b269f75e3c05a67d659de799 -rc4ad0672cee580dfc9a2835dcb2a39e92a49280f
--- Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision cfc35ba7d39c3a60b269f75e3c05a67d659de799)
+++ Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision c4ad0672cee580dfc9a2835dcb2a39e92a49280f)
@@ -151,9 +151,9 @@
}
///
- /// Creates the based on the type of map data.
+ /// Creates the .
///
- /// A configured based on the type of map data.
+ /// A configured .
/// null should never be returned as this will break DotSpatial.
protected abstract IFeatureScheme CreateScheme();
Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs
===================================================================
diff -u -rcfc35ba7d39c3a60b269f75e3c05a67d659de799 -rc4ad0672cee580dfc9a2835dcb2a39e92a49280f
--- Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision cfc35ba7d39c3a60b269f75e3c05a67d659de799)
+++ Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision c4ad0672cee580dfc9a2835dcb2a39e92a49280f)
@@ -99,7 +99,7 @@
return strokeColor;
}
- private IFeatureCategory CreateCategory(PolygonStyle style)
+ private static IFeatureCategory CreateCategory(PolygonStyle style)
{
return new PolygonCategory(style.FillColor, GetStrokeColor(style), style.StrokeThickness);
}
Index: Core/Components/src/Core.Components.Gis/Data/FeatureBasedMapData.cs
===================================================================
diff -u -r8d13dfd97d8d47ece688e76a53a691d133ae78d0 -rc4ad0672cee580dfc9a2835dcb2a39e92a49280f
--- Core/Components/src/Core.Components.Gis/Data/FeatureBasedMapData.cs (.../FeatureBasedMapData.cs) (revision 8d13dfd97d8d47ece688e76a53a691d133ae78d0)
+++ Core/Components/src/Core.Components.Gis/Data/FeatureBasedMapData.cs (.../FeatureBasedMapData.cs) (revision c4ad0672cee580dfc9a2835dcb2a39e92a49280f)
@@ -118,6 +118,14 @@
/// Creates a new instance of .
///
/// The name of the .
+ /// Thrown when is
+ /// null or only whitespace.
+ protected FeatureBasedMapData(string name) : this(name, null) {}
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The name of the .
/// The
/// belonging to the .
/// Thrown when is
Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs
===================================================================
diff -u -r127579cec65751d43951b1d04ddcd0fa1f8ec113 -rc4ad0672cee580dfc9a2835dcb2a39e92a49280f
--- Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision 127579cec65751d43951b1d04ddcd0fa1f8ec113)
+++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision c4ad0672cee580dfc9a2835dcb2a39e92a49280f)
@@ -772,7 +772,9 @@
private class TestFeatureBasedMapData : FeatureBasedMapData
{
- public TestFeatureBasedMapData(string name, MapTheme theme = null) : base(name, theme) {}
+ public TestFeatureBasedMapData(string name) : this(name, null) {}
+
+ public TestFeatureBasedMapData(string name, MapTheme theme) : base(name, theme) {}
}
private class TestFeatureBasedMapDataConverter : FeatureBasedMapDataConverter
Index: Core/Components/test/Core.Components.Gis.Test/Data/FeatureBasedMapDataTest.cs
===================================================================
diff -u -r8d13dfd97d8d47ece688e76a53a691d133ae78d0 -rc4ad0672cee580dfc9a2835dcb2a39e92a49280f
--- Core/Components/test/Core.Components.Gis.Test/Data/FeatureBasedMapDataTest.cs (.../FeatureBasedMapDataTest.cs) (revision 8d13dfd97d8d47ece688e76a53a691d133ae78d0)
+++ Core/Components/test/Core.Components.Gis.Test/Data/FeatureBasedMapDataTest.cs (.../FeatureBasedMapDataTest.cs) (revision c4ad0672cee580dfc9a2835dcb2a39e92a49280f)
@@ -150,10 +150,25 @@
}
[Test]
- public void TypedConstructor_WithCategoryThemes_ExpectedValues()
+ public void TypedConstructor_WitName_ExpectedValues()
{
// Setup
const string name = "name";
+
+ // Call
+ var data = new TypedTestFeatureBasedMapData(name);
+
+ // Assert
+ Assert.IsInstanceOf(data);
+ Assert.AreEqual(name, data.Name);
+ Assert.IsNull(data.Theme);
+ }
+
+ [Test]
+ public void TypedConstructor_WithNameAndCategoryThemes_ExpectedValues()
+ {
+ // Setup
+ const string name = "name";
var mapTheme = new MapTheme("test", new[]
{
new TestCategoryTheme()
@@ -177,6 +192,8 @@
{
public TypedTestFeatureBasedMapData(string name, MapTheme theme)
: base(name, theme) {}
+
+ public TypedTestFeatureBasedMapData(string name) : base(name) {}
}
private class TestCategoryTheme : CategoryTheme