mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
Use expression bodies for properties
This commit is contained in:
parent
74ba508e26
commit
209833561e
|
|
@ -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<KeyValuePair<string, object>> GetEnumerator()
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ namespace MapControl.Projections
|
|||
/// </summary>
|
||||
public string CoordinateSystemWkt
|
||||
{
|
||||
get { return CoordinateSystem?.WKT; }
|
||||
protected set { CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value); }
|
||||
get => CoordinateSystem?.WKT;
|
||||
protected set => CoordinateSystem = new CoordinateSystemFactory().CreateFromWkt(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -53,7 +53,7 @@ namespace MapControl.Projections
|
|||
/// </summary>
|
||||
public ICoordinateSystem CoordinateSystem
|
||||
{
|
||||
get { return coordinateSystem; }
|
||||
get => coordinateSystem;
|
||||
protected set
|
||||
{
|
||||
coordinateSystem = value ?? throw new ArgumentNullException(nameof(value));
|
||||
|
|
|
|||
|
|
@ -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<MapLayerItem> MapLayers { get; } = new ObservableCollection<MapLayerItem>();
|
||||
|
|
|
|||
|
|
@ -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<MapProjectionItem> MapProjections { get; } = new ObservableCollection<MapProjectionItem>();
|
||||
|
|
|
|||
|
|
@ -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<KeyValuePair<string, object>> GetEnumerator()
|
||||
|
|
|
|||
Loading…
Reference in a new issue