Index: Core/Common/src/Core.Common.Utils/Drawing/ColorAccess.cs =================================================================== diff -u -rc0ec9f5dc0c96437c4088eea1284fe2cc33bfddd -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Common/src/Core.Common.Utils/Drawing/ColorAccess.cs (.../ColorAccess.cs) (revision c0ec9f5dc0c96437c4088eea1284fe2cc33bfddd) +++ Core/Common/src/Core.Common.Utils/Drawing/ColorAccess.cs (.../ColorAccess.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -24,6 +24,7 @@ using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; +using Core.Common.Utils.Properties; namespace Core.Common.Utils.Drawing { @@ -79,7 +80,7 @@ /// /// The x-coordinate. /// The y-coordinate. - /// + /// The color of the given pixel. public Color this[int x, int y] { get @@ -116,15 +117,14 @@ return Color.FromArgb(Buffer[index + 3], Buffer[index + 2], Buffer[index + 1], Buffer[index]); default: - throw new NotImplementedException(); + throw new InvalidOperationException($"Indexing image for image format '{format}' isn't supported."); } } - set { if (format != PixelFormat.Format32bppArgb) { - throw new NotImplementedException(); + throw new InvalidOperationException($"Setting image color for image format '{format}' isn't supported."); } ValidateIndices(x, y); @@ -150,6 +150,8 @@ /// /// The image to update. /// Thrown when unable to access the image data of . + /// Thrown when + /// is null. public void SetBufferToImageAtOriginalLocation(Bitmap bitmap) { if (bitmap == null) @@ -172,7 +174,7 @@ /// Thrown when /// is null. /// Thrown when - /// does not fully fit within the bounds of . + /// is specified and does not fully fit within the bounds of . /// Thrown when unable to connect to the data buffers /// of . public static ColorAccess Create(Bitmap bitmap, Rectangle? accessibleArea = null) @@ -189,7 +191,8 @@ } else if (!fullBitmapArea.Contains(accessibleArea.Value)) { - throw new ArgumentException("Accessible area must be within the bounds of the image.", nameof(accessibleArea)); + throw new ArgumentException(Resources.ColorAccess_Create_Accessible_area_outside_image_bounds_error, + nameof(accessibleArea)); } BitmapData imageData = bitmap.LockBits(accessibleArea.Value, ImageLockMode.ReadOnly, bitmap.PixelFormat); Index: Core/Common/src/Core.Common.Utils/EnumDisplayWrapper.cs =================================================================== diff -u -rfa3b352bc1b1c01fc73a9a45268c5573807a6381 -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Common/src/Core.Common.Utils/EnumDisplayWrapper.cs (.../EnumDisplayWrapper.cs) (revision fa3b352bc1b1c01fc73a9a45268c5573807a6381) +++ Core/Common/src/Core.Common.Utils/EnumDisplayWrapper.cs (.../EnumDisplayWrapper.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -46,9 +46,9 @@ { throw new ArgumentNullException(nameof(value), @"An Enum type value is required."); } - if (!(typeof(Enum).IsAssignableFrom(typeof(T)))) + if (!typeof(Enum).IsAssignableFrom(typeof(T))) { - throw new InvalidTypeParameterException(@"The type parameter has to be an Enum type.", "T"); + throw new InvalidTypeParameterException(@"The type parameter has to be an Enum type.", nameof(T)); } Value = value; SetDisplayName(value); Index: Core/Common/src/Core.Common.Utils/IOUtils.cs =================================================================== diff -u -rf53b3c70d87b9e66c3a46981b8d8a471b95e2adc -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Common/src/Core.Common.Utils/IOUtils.cs (.../IOUtils.cs) (revision f53b3c70d87b9e66c3a46981b8d8a471b95e2adc) +++ Core/Common/src/Core.Common.Utils/IOUtils.cs (.../IOUtils.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -75,7 +75,7 @@ if (string.IsNullOrWhiteSpace(path)) { var message = new DirectoryWriterErrorMessageBuilder(path) - .Build(Resources.FileUtils_ValidateFolderPath_Path_cannot_be_empty); + .Build(Resources.IOUtils_ValidateFolderPath_Path_cannot_be_empty); throw new ArgumentException(message); } try @@ -85,19 +85,19 @@ catch (SecurityException e) { var message = new DirectoryWriterErrorMessageBuilder(path) - .Build(Resources.FileUtils_ValidateFolderPath_No_access_rights_to_folder); + .Build(Resources.IOUtils_ValidateFolderPath_No_access_rights_to_folder); throw new ArgumentException(message, e); } catch (PathTooLongException e) { var message = new DirectoryWriterErrorMessageBuilder(path) - .Build(Resources.FileUtils_ValidateFolderPath_Folder_path_too_long); + .Build(Resources.IOUtils_ValidateFolderPath_Folder_path_too_long); throw new ArgumentException(message, e); } catch (NotSupportedException e) { var message = new DirectoryWriterErrorMessageBuilder(path) - .Build(Resources.FileUtils_ValidateFolderPath_Folder_path_contains_invalid_character); + .Build(Resources.IOUtils_ValidateFolderPath_Folder_path_contains_invalid_character); throw new ArgumentException(message, e); } } @@ -200,7 +200,7 @@ if (e is ArgumentException || e is IOException || e is NotSupportedException || e is UnauthorizedAccessException) { var message = string.Format(CultureInfo.CurrentCulture, - Resources.FileUtils_DeleteOldFiles_Error_occurred_deleting_files_in_folder_0, + Resources.IOUtils_DeleteOldFiles_Error_occurred_deleting_files_in_folder_0, path); throw new IOException(message, e); } Index: Core/Common/src/Core.Common.Utils/Properties/Resources.Designer.cs =================================================================== diff -u -r16bd8076863c03907abeee60b16704aba1bdb1a0 -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Common/src/Core.Common.Utils/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 16bd8076863c03907abeee60b16704aba1bdb1a0) +++ Core/Common/src/Core.Common.Utils/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -82,6 +82,15 @@ } /// + /// Looks up a localized string similar to Toegankelijk gebied moet geheel binnen de afbeelding vallen.. + /// + public static string ColorAccess_Create_Accessible_area_outside_image_bounds_error { + get { + return ResourceManager.GetString("ColorAccess_Create_Accessible_area_outside_image_bounds_error", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Slechts de volgende waardes worden geaccepteerd: {0}.. /// public static string ConvertFrom_Only_following_values_are_accepted_ParameterValues_0_ { @@ -211,45 +220,45 @@ /// /// Looks up a localized string similar to Er is een fout opgetreden bij het verwijderen van bestanden in de map '{0}'.. /// - public static string FileUtils_DeleteOldFiles_Error_occurred_deleting_files_in_folder_0 { + public static string IOUtils_DeleteOldFiles_Error_occurred_deleting_files_in_folder_0 { get { - return ResourceManager.GetString("FileUtils_DeleteOldFiles_Error_occurred_deleting_files_in_folder_0", resourceCulture); + return ResourceManager.GetString("IOUtils_DeleteOldFiles_Error_occurred_deleting_files_in_folder_0", resourceCulture); } } /// /// Looks up a localized string similar to Het pad naar bestandsmap bevat een ':' op een ongeldige plek.. /// - public static string FileUtils_ValidateFolderPath_Folder_path_contains_invalid_character { + public static string IOUtils_ValidateFolderPath_Folder_path_contains_invalid_character { get { - return ResourceManager.GetString("FileUtils_ValidateFolderPath_Folder_path_contains_invalid_character", resourceCulture); + return ResourceManager.GetString("IOUtils_ValidateFolderPath_Folder_path_contains_invalid_character", resourceCulture); } } /// /// Looks up a localized string similar to Het pad naar bestandsmap is te lang.. /// - public static string FileUtils_ValidateFolderPath_Folder_path_too_long { + public static string IOUtils_ValidateFolderPath_Folder_path_too_long { get { - return ResourceManager.GetString("FileUtils_ValidateFolderPath_Folder_path_too_long", resourceCulture); + return ResourceManager.GetString("IOUtils_ValidateFolderPath_Folder_path_too_long", resourceCulture); } } /// /// Looks up a localized string similar to Geen toegangsrechten tot bestandsmap.. /// - public static string FileUtils_ValidateFolderPath_No_access_rights_to_folder { + public static string IOUtils_ValidateFolderPath_No_access_rights_to_folder { get { - return ResourceManager.GetString("FileUtils_ValidateFolderPath_No_access_rights_to_folder", resourceCulture); + return ResourceManager.GetString("IOUtils_ValidateFolderPath_No_access_rights_to_folder", resourceCulture); } } /// - /// Looks up a localized string similar to Pad naar bestandsmap mag niet leeg of ongedefinieerd zijn.. + /// Looks up a localized string similar to Pad naar bestandsmap moet opgegeven zijn.. /// - public static string FileUtils_ValidateFolderPath_Path_cannot_be_empty { + public static string IOUtils_ValidateFolderPath_Path_cannot_be_empty { get { - return ResourceManager.GetString("FileUtils_ValidateFolderPath_Path_cannot_be_empty", resourceCulture); + return ResourceManager.GetString("IOUtils_ValidateFolderPath_Path_cannot_be_empty", resourceCulture); } } Index: Core/Common/src/Core.Common.Utils/Properties/Resources.resx =================================================================== diff -u -r16bd8076863c03907abeee60b16704aba1bdb1a0 -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Common/src/Core.Common.Utils/Properties/Resources.resx (.../Resources.resx) (revision 16bd8076863c03907abeee60b16704aba1bdb1a0) +++ Core/Common/src/Core.Common.Utils/Properties/Resources.resx (.../Resources.resx) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -153,7 +153,7 @@ op regel {0} - + Er is een fout opgetreden bij het verwijderen van bestanden in de map '{0}'. @@ -168,16 +168,19 @@ Fout bij het schrijven naar bestandsmap '{0}': {1} - - Pad naar bestandsmap mag niet leeg of ongedefinieerd zijn. + + Pad naar bestandsmap moet opgegeven zijn. - + Geen toegangsrechten tot bestandsmap. - + Het pad naar bestandsmap is te lang. - + Het pad naar bestandsmap bevat een ':' op een ongeldige plek. + + Toegankelijk gebied moet geheel binnen de afbeelding vallen. + \ No newline at end of file Index: Core/Common/test/Core.Common.Utils.Test/Drawing/ColorAccessTest.cs =================================================================== diff -u -rc0ec9f5dc0c96437c4088eea1284fe2cc33bfddd -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Common/test/Core.Common.Utils.Test/Drawing/ColorAccessTest.cs (.../ColorAccessTest.cs) (revision c0ec9f5dc0c96437c4088eea1284fe2cc33bfddd) +++ Core/Common/test/Core.Common.Utils.Test/Drawing/ColorAccessTest.cs (.../ColorAccessTest.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -56,7 +56,7 @@ TestDelegate call = () => ColorAccess.Create(Resources.Black2x2, rect); // Assert - string message = "Accessible area must be within the bounds of the image."; + string message = "Toegankelijk gebied moet geheel binnen de afbeelding vallen."; string paramName = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, message).ParamName; Assert.AreEqual("accessibleArea", paramName); } Index: Core/Common/test/Core.Common.Utils.Test/IOUtilsTest.cs =================================================================== diff -u -rf53b3c70d87b9e66c3a46981b8d8a471b95e2adc -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Common/test/Core.Common.Utils.Test/IOUtilsTest.cs (.../IOUtilsTest.cs) (revision f53b3c70d87b9e66c3a46981b8d8a471b95e2adc) +++ Core/Common/test/Core.Common.Utils.Test/IOUtilsTest.cs (.../IOUtilsTest.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -100,7 +100,7 @@ TestDelegate call = () => IOUtils.ValidateFolderPath(invalidPath); // Assert - string message = $"Fout bij het schrijven naar bestandsmap '{invalidPath}': pad naar bestandsmap mag niet leeg of ongedefinieerd zijn."; + string message = $"Fout bij het schrijven naar bestandsmap '{invalidPath}': pad naar bestandsmap moet opgegeven zijn."; TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, message); } Index: Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj =================================================================== diff -u -r1834682a9baa164ed89f7225ce6ec8b00264952f -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 1834682a9baa164ed89f7225ce6ec8b00264952f) +++ Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -9,8 +9,6 @@ Core.Components.DotSpatial v4.0 512 - - true Index: Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs =================================================================== diff -u -r6e93798b2be731889dadc6c50247ea16f4d13d9c -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs (.../BruTileLayer.cs) (revision 6e93798b2be731889dadc6c50247ea16f4d13d9c) +++ Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs (.../BruTileLayer.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -114,15 +114,18 @@ /// /// Creates an instance of this class using some tile source configuration. /// - /// The tile source configuration. + /// The tile source configuration. If the configuration + /// hasn't been initialized yet, will + /// be called. /// Thrown when /// is null. - /// Thrown when no tile source - /// can be found based on . - /// Thrown when a critical error - /// prevents the creation of the persistent tile cache. - /// Thrown when it no tiles can be - /// received from the tile source. + /// Thrown when + /// is not initialized and during initialization no tile source can be found based. + /// Thrown when + /// is not initialized and during initialization a critical error prevents the creation + /// of the persistent tile cache. + /// Thrown when + /// is not initialized and during initialization no tiles can be received from the tile source. public BruTileLayer(IConfiguration configuration) { if (configuration == null) Index: Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Configurations/TileSourceFactory.cs =================================================================== diff -u -rfa3b352bc1b1c01fc73a9a45268c5573807a6381 -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Configurations/TileSourceFactory.cs (.../TileSourceFactory.cs) (revision fa3b352bc1b1c01fc73a9a45268c5573807a6381) +++ Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Configurations/TileSourceFactory.cs (.../TileSourceFactory.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -39,7 +39,7 @@ private static ITileSourceFactory instance; /// - /// The singleton instance. + /// Gets the singleton instance of . /// public static ITileSourceFactory Instance { @@ -63,6 +63,13 @@ return wmtsTileSources; } + /// + /// Parses the capabilities XML provided by the WMTS. + /// + /// The WMTS url. + /// The tile sources offered by the service. + /// Thrown when unable to connect + /// to the WMTS and parse the response. private static IEnumerable ParseWmtsTileSources(string capabilitiesUrl) { try Index: Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Configurations/WmtsLayerConfiguration.cs =================================================================== diff -u -rb38a6537a602c558abf8f8ab3e349457604fa4f4 -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Configurations/WmtsLayerConfiguration.cs (.../WmtsLayerConfiguration.cs) (revision b38a6537a602c558abf8f8ab3e349457604fa4f4) +++ Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Configurations/WmtsLayerConfiguration.cs (.../WmtsLayerConfiguration.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -106,6 +106,13 @@ /// Thrown when any input argument is null. /// Thrown when /// is not an image MIME-type. + /// Thrown when it has become impossible + /// to create a based on the given information (for example: + /// unable to connect to server). + /// Thrown when it has become impossible + /// to create the persistent tile cache for the configuration. + /// Thrown when it has become impossible + /// to receive tiles with the initialized . public static WmtsLayerConfiguration CreateInitializedConfiguration(string wmtsCapabilitiesUrl, string capabilityIdentifier, string preferredFormat) { ValidateConfigurationParameters(wmtsCapabilitiesUrl, capabilityIdentifier, preferredFormat); Index: Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Projections/WorldFile.cs =================================================================== diff -u -rc0ec9f5dc0c96437c4088eea1284fe2cc33bfddd -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Projections/WorldFile.cs (.../WorldFile.cs) (revision c0ec9f5dc0c96437c4088eea1284fe2cc33bfddd) +++ Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/Projections/WorldFile.cs (.../WorldFile.cs) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -61,6 +61,8 @@ /// along the X-axis). /// Y-ordinate of the center of the top left pixel. (Translation /// along the Y-axis) + /// Thrown when the 'a' input arguments do not + /// define an invertible matrix. public WorldFile(double a11, double a21, double a12, double a22, double b1, double b2) { matrix.A11 = a11; Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/app.config =================================================================== diff -u -r7cc1fd960a912443ccc3c6995eccb5673d1d8d22 -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/app.config (.../app.config) (revision 7cc1fd960a912443ccc3c6995eccb5673d1d8d22) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/app.config (.../app.config) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -1,4 +1,26 @@  + Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/packages.config =================================================================== diff -u -r6a5d7b40b7ba4dcb73e393075338352d194e97c2 -r6c1eddbd3f88a9dcedec6c113de50416073ddfb3 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/packages.config (.../packages.config) (revision 6a5d7b40b7ba4dcb73e393075338352d194e97c2) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/packages.config (.../packages.config) (revision 6c1eddbd3f88a9dcedec6c113de50416073ddfb3) @@ -1,4 +1,5 @@  +