Use expression bodies for properties

This commit is contained in:
Clemens 2022-08-06 11:04:49 +02:00
parent 74ba508e26
commit 209833561e
6 changed files with 19 additions and 29 deletions

View file

@ -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));