mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Code style
This commit is contained in:
parent
f897ce3d36
commit
046cebb341
|
|
@ -38,7 +38,7 @@ namespace MapControl
|
|||
public virtual double Width => East - West;
|
||||
public virtual double Height => North - South;
|
||||
|
||||
public virtual Location Center => new Location((South + North) / 2d, (West + East) / 2d);
|
||||
public virtual Location Center => new((South + North) / 2d, (West + East) / 2d);
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace MapControl
|
|||
private static string QueryString(ushort tag) => $"/ifd/{{ushort={tag}}}";
|
||||
|
||||
private static ILogger logger;
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger<GroundOverlay>();
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(GeoImage));
|
||||
|
||||
public static readonly DependencyProperty SourcePathProperty =
|
||||
DependencyPropertyHelper.RegisterAttached<string>("SourcePath", typeof(GeoImage), null,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace MapControl
|
|||
}
|
||||
|
||||
private static ILogger logger;
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger<GroundOverlay>();
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(GroundOverlay));
|
||||
|
||||
public static readonly DependencyProperty SourcePathProperty =
|
||||
DependencyPropertyHelper.Register<GroundOverlay, string>(nameof(SourcePath), null,
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ namespace MapControl.Caching
|
|||
rootDirectory = new DirectoryInfo(!string.IsNullOrEmpty(path) ? path : "TileCache");
|
||||
rootDirectory.Create();
|
||||
|
||||
logger = loggerFactory?.CreateLogger<ImageFileCache>();
|
||||
logger = loggerFactory?.CreateLogger(typeof(ImageFileCache));
|
||||
logger?.LogInformation("Started in {name}", rootDirectory.FullName);
|
||||
|
||||
var memoryCacheOptions = new MemoryDistributedCacheOptions();
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace MapControl
|
|||
public static partial class ImageLoader
|
||||
{
|
||||
private static ILogger logger;
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger<GroundOverlay>();
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(ImageLoader));
|
||||
|
||||
public static ILoggerFactory LoggerFactory { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ namespace MapControl
|
|||
/// <summary>
|
||||
/// Gets or sets an optional projection center.
|
||||
/// </summary>
|
||||
public virtual Location Center { get; protected internal set; } = new Location();
|
||||
public virtual Location Center { get; protected internal set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the relative map scale at the specified Location.
|
||||
/// </summary>
|
||||
public virtual Point GetRelativeScale(Location location) => new Point(1d, 1d);
|
||||
public virtual Point GetRelativeScale(Location location) => new(1d, 1d);
|
||||
|
||||
/// <summary>
|
||||
/// Transforms a Location in geographic coordinates to a Point in projected map coordinates.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace MapControl
|
|||
public class TileImageLoader : ITileImageLoader
|
||||
{
|
||||
private static ILogger logger;
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger<GroundOverlay>();
|
||||
private static ILogger Logger => logger ??= ImageLoader.LoggerFactory?.CreateLogger(typeof(TileImageLoader));
|
||||
|
||||
/// <summary>
|
||||
/// Default folder path where a persistent cache implementation may save data, i.e. "C:\ProgramData\MapControl\TileCache".
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ namespace MapControl
|
|||
|
||||
public TileMatrix TileMatrix { get; private set; }
|
||||
|
||||
public TileCollection Tiles { get; private set; } = new TileCollection();
|
||||
public TileCollection Tiles { get; private set; } = [];
|
||||
|
||||
public void SetRenderTransform(ViewTransform viewTransform)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue