Removed partial declarations

This commit is contained in:
ClemensFischer 2025-11-14 23:59:24 +01:00
parent 96513468d8
commit c594727711
16 changed files with 22 additions and 23 deletions

View file

@ -26,7 +26,7 @@ using Avalonia.Media;
namespace MapControl namespace MapControl
{ {
public partial class GroundOverlay : MapPanel public class GroundOverlay : MapPanel
{ {
private class ImageOverlay private class ImageOverlay
{ {

View file

@ -23,7 +23,7 @@ namespace MapControl.Caching
/// IDistributedCache implementation that creates a single file per cache entry. /// IDistributedCache implementation that creates a single file per cache entry.
/// The cache expiration time is stored in the file's CreationTime property. /// The cache expiration time is stored in the file's CreationTime property.
/// </summary> /// </summary>
public sealed partial class ImageFileCache : IDistributedCache, IDisposable public sealed class ImageFileCache : IDistributedCache, IDisposable
{ {
private readonly MemoryDistributedCache memoryCache; private readonly MemoryDistributedCache memoryCache;
private readonly DirectoryInfo rootDirectory; private readonly DirectoryInfo rootDirectory;

View file

@ -3,7 +3,7 @@ using System.Linq;
namespace MapControl namespace MapControl
{ {
public partial class ImageTileList : List<ImageTile> public class ImageTileList : List<ImageTile>
{ {
/// <summary> /// <summary>
/// Adds existing ImageTile from the source collection or newly created ImageTile to fill the specified tile matrix. /// Adds existing ImageTile from the source collection or newly created ImageTile to fill the specified tile matrix.

View file

@ -13,7 +13,7 @@ namespace MapControl
#else #else
[System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))] [System.ComponentModel.TypeConverter(typeof(LocationCollectionConverter))]
#endif #endif
public partial class LocationCollection : List<Location> public class LocationCollection : List<Location>
{ {
public LocationCollection() public LocationCollection()
{ {

View file

@ -16,7 +16,7 @@ namespace MapControl
/// Such elements are arranged at a distance of BorderWidth/2 from the edges of the /// 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. /// MapBorderPanel in direction of their original azimuth from the map center.
/// </summary> /// </summary>
public partial class MapBorderPanel : MapPanel public class MapBorderPanel : MapPanel
{ {
public static readonly DependencyProperty BorderWidthProperty = public static readonly DependencyProperty BorderWidthProperty =
DependencyPropertyHelper.Register<MapBorderPanel, double>(nameof(BorderWidth)); DependencyPropertyHelper.Register<MapBorderPanel, double>(nameof(BorderWidth));

View file

@ -17,7 +17,7 @@ namespace MapControl
/// for the Polygons property if collection changes of the property itself and its /// for the Polygons property if collection changes of the property itself and its
/// elements are both supposed to trigger UI updates. /// elements are both supposed to trigger UI updates.
/// </summary> /// </summary>
public partial class MapMultiPolygon : MapPolypoint public class MapMultiPolygon : MapPolypoint
{ {
public static readonly DependencyProperty PolygonsProperty = public static readonly DependencyProperty PolygonsProperty =
DependencyPropertyHelper.Register<MapMultiPolygon, IEnumerable<IEnumerable<Location>>>(nameof(Polygons), null, DependencyPropertyHelper.Register<MapMultiPolygon, IEnumerable<IEnumerable<Location>>>(nameof(Polygons), null,

View file

@ -16,7 +16,7 @@ namespace MapControl
/// <summary> /// <summary>
/// A MapPanel with a collection of GroundOverlay or GeoImage children. /// A MapPanel with a collection of GroundOverlay or GeoImage children.
/// </summary> /// </summary>
public partial class MapOverlaysPanel : MapPanel public class MapOverlaysPanel : MapPanel
{ {
public static readonly DependencyProperty SourcePathsProperty = public static readonly DependencyProperty SourcePathsProperty =
DependencyPropertyHelper.Register<MapOverlaysPanel, IEnumerable<string>>(nameof(SourcePaths), null, DependencyPropertyHelper.Register<MapOverlaysPanel, IEnumerable<string>>(nameof(SourcePaths), null,

View file

@ -1,5 +1,4 @@
using System.Linq; #if WPF
#if WPF
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Media; using System.Windows.Media;
@ -177,7 +176,7 @@ namespace MapControl
{ {
availableSize = new Size(double.PositiveInfinity, double.PositiveInfinity); availableSize = new Size(double.PositiveInfinity, double.PositiveInfinity);
foreach (var element in Children.Cast<FrameworkElement>()) foreach (FrameworkElement element in Children)
{ {
element.Measure(availableSize); element.Measure(availableSize);
} }
@ -189,7 +188,7 @@ namespace MapControl
{ {
if (parentMap != null) if (parentMap != null)
{ {
foreach (var element in Children.Cast<FrameworkElement>()) foreach (FrameworkElement element in Children)
{ {
ArrangeChildElement(element, finalSize); ArrangeChildElement(element, finalSize);
} }

View file

@ -12,7 +12,7 @@ namespace MapControl
/// <summary> /// <summary>
/// A polygon defined by a collection of Locations. /// A polygon defined by a collection of Locations.
/// </summary> /// </summary>
public partial class MapPolygon : MapPolypoint public class MapPolygon : MapPolypoint
{ {
public static readonly DependencyProperty LocationsProperty = public static readonly DependencyProperty LocationsProperty =
DependencyPropertyHelper.Register<MapPolygon, IEnumerable<Location>>(nameof(Locations), null, DependencyPropertyHelper.Register<MapPolygon, IEnumerable<Location>>(nameof(Locations), null,

View file

@ -12,7 +12,7 @@ namespace MapControl
/// <summary> /// <summary>
/// A polyline defined by a collection of Locations. /// A polyline defined by a collection of Locations.
/// </summary> /// </summary>
public partial class MapPolyline : MapPolypoint public class MapPolyline : MapPolypoint
{ {
public static readonly DependencyProperty LocationsProperty = public static readonly DependencyProperty LocationsProperty =
DependencyPropertyHelper.Register<MapPolyline, IEnumerable<Location>>(nameof(Locations), null, DependencyPropertyHelper.Register<MapPolyline, IEnumerable<Location>>(nameof(Locations), null,

View file

@ -35,7 +35,7 @@ namespace MapControl
/// <summary> /// <summary>
/// Draws a map scale overlay. /// Draws a map scale overlay.
/// </summary> /// </summary>
public partial class MapScale : MapPanel public class MapScale : MapPanel
{ {
public static readonly DependencyProperty PaddingProperty = public static readonly DependencyProperty PaddingProperty =
DependencyPropertyHelper.Register<MapScale, Thickness>(nameof(Padding), new Thickness(4)); DependencyPropertyHelper.Register<MapScale, Thickness>(nameof(Padding), new Thickness(4));

View file

@ -22,7 +22,7 @@ namespace MapControl
/// <summary> /// <summary>
/// Displays a Web Mercator tile pyramid. /// Displays a Web Mercator tile pyramid.
/// </summary> /// </summary>
public partial class MapTileLayer : TilePyramidLayer public class MapTileLayer : TilePyramidLayer
{ {
private const int TileSize = 256; private const int TileSize = 256;

View file

@ -18,7 +18,7 @@ using ConverterCulture = System.Globalization.CultureInfo;
namespace MapControl namespace MapControl
{ {
public partial class LocationConverter : TypeConverter, IValueConverter public class LocationConverter : TypeConverter, IValueConverter
{ {
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) 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) 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) 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) 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) public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{ {

View file

@ -25,7 +25,7 @@ namespace MapControl
/// <summary> /// <summary>
/// Displays a single map image from a Web Map Service (WMS). /// Displays a single map image from a Web Map Service (WMS).
/// </summary> /// </summary>
public partial class WmsImageLayer : MapImageLayer public class WmsImageLayer : MapImageLayer
{ {
private static ILogger logger; private static ILogger logger;
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(WmsImageLayer)); private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(WmsImageLayer));

View file

@ -20,7 +20,7 @@ namespace MapControl
/// <summary> /// <summary>
/// Displays map tiles from a Web Map Tile Service (WMTS). /// Displays map tiles from a Web Map Tile Service (WMTS).
/// </summary> /// </summary>
public partial class WmtsTileLayer : TilePyramidLayer public class WmtsTileLayer : TilePyramidLayer
{ {
private static ILogger logger; private static ILogger logger;
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(WmtsTileLayer)); private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(WmtsTileLayer));

View file

@ -19,7 +19,7 @@ using Avalonia.Media;
namespace MapControl namespace MapControl
{ {
public partial class WmtsTileMatrixLayer : Panel public class WmtsTileMatrixLayer : Panel
{ {
// zoomLevel is index of tileMatrix in a WmtsTileMatrixSet.TileMatrixes list. // zoomLevel is index of tileMatrix in a WmtsTileMatrixSet.TileMatrixes list.
// //