diff --git a/FileDbCache/WPF/FileDbCache.WPF.cs b/FileDbCache/WPF/FileDbCache.WPF.cs index c461177d..0f3418ce 100644 --- a/FileDbCache/WPF/FileDbCache.WPF.cs +++ b/FileDbCache/WPF/FileDbCache.WPF.cs @@ -12,20 +12,15 @@ namespace MapControl.Caching { public partial class FileDbCache : ObjectCache { - public override string Name - { - get { return string.Empty; } - } + public override string Name => string.Empty; - public override DefaultCacheCapabilities DefaultCacheCapabilities - { - get { return DefaultCacheCapabilities.AbsoluteExpirations | DefaultCacheCapabilities.SlidingExpirations; } - } + public override DefaultCacheCapabilities DefaultCacheCapabilities => + DefaultCacheCapabilities.AbsoluteExpirations | DefaultCacheCapabilities.SlidingExpirations; public override object this[string key] { - get { return Get(key); } - set { Set(key, value, null); } + get => Get(key); + set => Set(key, value, null); } protected override IEnumerator> GetEnumerator() diff --git a/MBTiles/Shared/MBTileLayer.cs b/MBTiles/Shared/MBTileLayer.cs index 2098e5af..4669f346 100644 --- a/MBTiles/Shared/MBTileLayer.cs +++ b/MBTiles/Shared/MBTileLayer.cs @@ -34,8 +34,8 @@ namespace MapControl.MBTiles public string File { - get { return (string)GetValue(FileProperty); } - set { SetValue(FileProperty, value); } + get => (string)GetValue(FileProperty); + set => SetValue(FileProperty, value); } /// diff --git a/MapProjections/Shared/GeoApiProjection.cs b/MapProjections/Shared/GeoApiProjection.cs index 580f7208..79de1a00 100644 --- a/MapProjections/Shared/GeoApiProjection.cs +++ b/MapProjections/Shared/GeoApiProjection.cs @@ -44,8 +44,8 @@ namespace MapControl.Projections /// public string CoordinateSystemWkt { - get { return CoordinateSystem?.WKT; } - protected set { CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value); } + get => CoordinateSystem?.WKT; + protected set => CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value); } /// @@ -53,7 +53,7 @@ namespace MapControl.Projections /// public ICoordinateSystem CoordinateSystem { - get { return coordinateSystem; } + get => coordinateSystem; protected set { coordinateSystem = value ?? throw new ArgumentNullException(nameof(value)); diff --git a/MapUiTools/Shared/MapLayersMenuButton.cs b/MapUiTools/Shared/MapLayersMenuButton.cs index 03a9c828..3a34e898 100644 --- a/MapUiTools/Shared/MapLayersMenuButton.cs +++ b/MapUiTools/Shared/MapLayersMenuButton.cs @@ -51,8 +51,8 @@ namespace MapControl.UiTools public MapBase Map { - get { return (MapBase)GetValue(MapProperty); } - set { SetValue(MapProperty, value); } + get => (MapBase)GetValue(MapProperty); + set => SetValue(MapProperty, value); } public Collection MapLayers { get; } = new ObservableCollection(); diff --git a/MapUiTools/Shared/MapProjectionsMenuButton.cs b/MapUiTools/Shared/MapProjectionsMenuButton.cs index 9dddb870..a7abde12 100644 --- a/MapUiTools/Shared/MapProjectionsMenuButton.cs +++ b/MapUiTools/Shared/MapProjectionsMenuButton.cs @@ -50,8 +50,8 @@ namespace MapControl.UiTools public MapBase Map { - get { return (MapBase)GetValue(MapProperty); } - set { SetValue(MapProperty, value); } + get => (MapBase)GetValue(MapProperty); + set => SetValue(MapProperty, value); } public Collection MapProjections { get; } = new ObservableCollection(); diff --git a/SQLiteCache/WPF/SQLiteCache.WPF.cs b/SQLiteCache/WPF/SQLiteCache.WPF.cs index fcd989f0..698ae852 100644 --- a/SQLiteCache/WPF/SQLiteCache.WPF.cs +++ b/SQLiteCache/WPF/SQLiteCache.WPF.cs @@ -13,20 +13,15 @@ namespace MapControl.Caching { public partial class SQLiteCache : ObjectCache { - public override string Name - { - get { return string.Empty; } - } + public override string Name => string.Empty; - public override DefaultCacheCapabilities DefaultCacheCapabilities - { - get { return DefaultCacheCapabilities.AbsoluteExpirations | DefaultCacheCapabilities.SlidingExpirations; } - } + public override DefaultCacheCapabilities DefaultCacheCapabilities => + DefaultCacheCapabilities.AbsoluteExpirations | DefaultCacheCapabilities.SlidingExpirations; public override object this[string key] { - get { return Get(key); } - set { Set(key, value, null); } + get => Get(key); + set => Set(key, value, null); } protected override IEnumerator> GetEnumerator()