diff --git a/MapControl/Shared/GroundOverlay.cs b/MapControl/Shared/GroundOverlay.cs index bb325a9c..bdc52d39 100644 --- a/MapControl/Shared/GroundOverlay.cs +++ b/MapControl/Shared/GroundOverlay.cs @@ -26,7 +26,7 @@ using Avalonia.Media; namespace MapControl { - public partial class GroundOverlay : MapPanel + public class GroundOverlay : MapPanel { private class ImageOverlay { diff --git a/MapControl/Shared/ImageFileCache.cs b/MapControl/Shared/ImageFileCache.cs index 22aaf78e..0640d458 100644 --- a/MapControl/Shared/ImageFileCache.cs +++ b/MapControl/Shared/ImageFileCache.cs @@ -23,7 +23,7 @@ namespace MapControl.Caching /// IDistributedCache implementation that creates a single file per cache entry. /// The cache expiration time is stored in the file's CreationTime property. /// - public sealed partial class ImageFileCache : IDistributedCache, IDisposable + public sealed class ImageFileCache : IDistributedCache, IDisposable { private readonly MemoryDistributedCache memoryCache; private readonly DirectoryInfo rootDirectory; diff --git a/MapControl/Shared/ImageTileList.cs b/MapControl/Shared/ImageTileList.cs index bf058f18..9366fe32 100644 --- a/MapControl/Shared/ImageTileList.cs +++ b/MapControl/Shared/ImageTileList.cs @@ -3,7 +3,7 @@ using System.Linq; namespace MapControl { - public partial class ImageTileList : List + public class ImageTileList : List { /// /// Adds existing ImageTile from the source collection or newly created ImageTile to fill the specified tile matrix. diff --git a/MapControl/Shared/LocationCollection.cs b/MapControl/Shared/LocationCollection.cs index 18ed92b6..39f9687a 100644 --- a/MapControl/Shared/LocationCollection.cs +++ b/MapControl/Shared/LocationCollection.cs @@ -13,7 +13,7 @@ namespace MapControl #else [System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))] #endif - public partial class LocationCollection : List + public class LocationCollection : List { public LocationCollection() { diff --git a/MapControl/Shared/MapBorderPanel.cs b/MapControl/Shared/MapBorderPanel.cs index 14a0747e..f99dc0b0 100644 --- a/MapControl/Shared/MapBorderPanel.cs +++ b/MapControl/Shared/MapBorderPanel.cs @@ -16,7 +16,7 @@ namespace MapControl /// Such elements are arranged at a distance of BorderWidth/2 from the edges of the /// MapBorderPanel in direction of their original azimuth from the map center. /// - public partial class MapBorderPanel : MapPanel + public class MapBorderPanel : MapPanel { public static readonly DependencyProperty BorderWidthProperty = DependencyPropertyHelper.Register(nameof(BorderWidth)); diff --git a/MapControl/Shared/MapMultiPolygon.cs b/MapControl/Shared/MapMultiPolygon.cs index adcb0a07..9fa47f61 100644 --- a/MapControl/Shared/MapMultiPolygon.cs +++ b/MapControl/Shared/MapMultiPolygon.cs @@ -17,7 +17,7 @@ namespace MapControl /// for the Polygons property if collection changes of the property itself and its /// elements are both supposed to trigger UI updates. /// - public partial class MapMultiPolygon : MapPolypoint + public class MapMultiPolygon : MapPolypoint { public static readonly DependencyProperty PolygonsProperty = DependencyPropertyHelper.Register>>(nameof(Polygons), null, diff --git a/MapControl/Shared/MapOverlaysPanel.cs b/MapControl/Shared/MapOverlaysPanel.cs index a2b5cb7c..8f78451a 100644 --- a/MapControl/Shared/MapOverlaysPanel.cs +++ b/MapControl/Shared/MapOverlaysPanel.cs @@ -16,7 +16,7 @@ namespace MapControl /// /// A MapPanel with a collection of GroundOverlay or GeoImage children. /// - public partial class MapOverlaysPanel : MapPanel + public class MapOverlaysPanel : MapPanel { public static readonly DependencyProperty SourcePathsProperty = DependencyPropertyHelper.Register>(nameof(SourcePaths), null, diff --git a/MapControl/Shared/MapPanel.cs b/MapControl/Shared/MapPanel.cs index ca7348ba..2f1e4db2 100644 --- a/MapControl/Shared/MapPanel.cs +++ b/MapControl/Shared/MapPanel.cs @@ -1,5 +1,4 @@ -using System.Linq; -#if WPF +#if WPF using System.Windows; using System.Windows.Controls; using System.Windows.Media; @@ -177,7 +176,7 @@ namespace MapControl { availableSize = new Size(double.PositiveInfinity, double.PositiveInfinity); - foreach (var element in Children.Cast()) + foreach (FrameworkElement element in Children) { element.Measure(availableSize); } @@ -189,7 +188,7 @@ namespace MapControl { if (parentMap != null) { - foreach (var element in Children.Cast()) + foreach (FrameworkElement element in Children) { ArrangeChildElement(element, finalSize); } diff --git a/MapControl/Shared/MapPolygon.cs b/MapControl/Shared/MapPolygon.cs index 8b7fe830..b5721247 100644 --- a/MapControl/Shared/MapPolygon.cs +++ b/MapControl/Shared/MapPolygon.cs @@ -12,7 +12,7 @@ namespace MapControl /// /// A polygon defined by a collection of Locations. /// - public partial class MapPolygon : MapPolypoint + public class MapPolygon : MapPolypoint { public static readonly DependencyProperty LocationsProperty = DependencyPropertyHelper.Register>(nameof(Locations), null, diff --git a/MapControl/Shared/MapPolyline.cs b/MapControl/Shared/MapPolyline.cs index aabc3331..544cb1c4 100644 --- a/MapControl/Shared/MapPolyline.cs +++ b/MapControl/Shared/MapPolyline.cs @@ -12,7 +12,7 @@ namespace MapControl /// /// A polyline defined by a collection of Locations. /// - public partial class MapPolyline : MapPolypoint + public class MapPolyline : MapPolypoint { public static readonly DependencyProperty LocationsProperty = DependencyPropertyHelper.Register>(nameof(Locations), null, diff --git a/MapControl/Shared/MapScale.cs b/MapControl/Shared/MapScale.cs index a5e3dcf0..7e714660 100644 --- a/MapControl/Shared/MapScale.cs +++ b/MapControl/Shared/MapScale.cs @@ -35,7 +35,7 @@ namespace MapControl /// /// Draws a map scale overlay. /// - public partial class MapScale : MapPanel + public class MapScale : MapPanel { public static readonly DependencyProperty PaddingProperty = DependencyPropertyHelper.Register(nameof(Padding), new Thickness(4)); diff --git a/MapControl/Shared/MapTileLayer.cs b/MapControl/Shared/MapTileLayer.cs index eb16b6aa..f118deac 100644 --- a/MapControl/Shared/MapTileLayer.cs +++ b/MapControl/Shared/MapTileLayer.cs @@ -22,7 +22,7 @@ namespace MapControl /// /// Displays a Web Mercator tile pyramid. /// - public partial class MapTileLayer : TilePyramidLayer + public class MapTileLayer : TilePyramidLayer { private const int TileSize = 256; diff --git a/MapControl/Shared/TypeConverters.cs b/MapControl/Shared/TypeConverters.cs index 52e775d7..348b0e7f 100644 --- a/MapControl/Shared/TypeConverters.cs +++ b/MapControl/Shared/TypeConverters.cs @@ -18,7 +18,7 @@ using ConverterCulture = System.Globalization.CultureInfo; namespace MapControl { - public partial class LocationConverter : TypeConverter, IValueConverter + public class LocationConverter : TypeConverter, IValueConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { @@ -41,7 +41,7 @@ namespace MapControl } } - public partial class LocationCollectionConverter : TypeConverter, IValueConverter + public class LocationCollectionConverter : TypeConverter, IValueConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { @@ -64,7 +64,7 @@ namespace MapControl } } - public partial class BoundingBoxConverter : TypeConverter, IValueConverter + public class BoundingBoxConverter : TypeConverter, IValueConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { @@ -87,7 +87,7 @@ namespace MapControl } } - public partial class TileSourceConverter : TypeConverter, IValueConverter + public class TileSourceConverter : TypeConverter, IValueConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { @@ -110,7 +110,7 @@ namespace MapControl } } - public partial class MapProjectionConverter : TypeConverter, IValueConverter + public class MapProjectionConverter : TypeConverter, IValueConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { diff --git a/MapControl/Shared/WmsImageLayer.cs b/MapControl/Shared/WmsImageLayer.cs index 35484f4c..acec2a42 100644 --- a/MapControl/Shared/WmsImageLayer.cs +++ b/MapControl/Shared/WmsImageLayer.cs @@ -25,7 +25,7 @@ namespace MapControl /// /// Displays a single map image from a Web Map Service (WMS). /// - public partial class WmsImageLayer : MapImageLayer + public class WmsImageLayer : MapImageLayer { private static ILogger logger; private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(WmsImageLayer)); diff --git a/MapControl/Shared/WmtsTileLayer.cs b/MapControl/Shared/WmtsTileLayer.cs index 8093af0d..df951949 100644 --- a/MapControl/Shared/WmtsTileLayer.cs +++ b/MapControl/Shared/WmtsTileLayer.cs @@ -20,7 +20,7 @@ namespace MapControl /// /// Displays map tiles from a Web Map Tile Service (WMTS). /// - public partial class WmtsTileLayer : TilePyramidLayer + public class WmtsTileLayer : TilePyramidLayer { private static ILogger logger; private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(WmtsTileLayer)); diff --git a/MapControl/Shared/WmtsTileMatrixLayer.cs b/MapControl/Shared/WmtsTileMatrixLayer.cs index 9d2c8380..23ad6b80 100644 --- a/MapControl/Shared/WmtsTileMatrixLayer.cs +++ b/MapControl/Shared/WmtsTileMatrixLayer.cs @@ -19,7 +19,7 @@ using Avalonia.Media; namespace MapControl { - public partial class WmtsTileMatrixLayer : Panel + public class WmtsTileMatrixLayer : Panel { // zoomLevel is index of tileMatrix in a WmtsTileMatrixSet.TileMatrixes list. //