Skip to content

Commit 5d502da

Browse files
committed
add DebuggerDisplay
1 parent c6f96ae commit 5d502da

8 files changed

Lines changed: 18 additions & 3 deletions

File tree

src/CountryData/Model/Community.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Diagnostics;
23
using System.Runtime.Serialization;
34
using System.Text.Json.Serialization;
45

@@ -13,6 +14,7 @@ public interface ICommunity
1314
IProvince Province { get; }
1415
}
1516

17+
[DebuggerDisplay("Name='{Name}', Code='{Code}'")]
1618
class Community :
1719
ICommunity
1820
{

src/CountryData/Model/Country.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Diagnostics;
23

34
namespace CountryData
45
{
@@ -23,6 +24,7 @@ public interface ICountry
2324
IReadOnlyList<IState> States { get; }
2425
}
2526

27+
[DebuggerDisplay("Name='{Iso}', Code='{Iso}'")]
2628
class Country :
2729
ICountry
2830
{

src/CountryData/Model/CountryInfo.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Diagnostics;
23

34
namespace CountryData
45
{
@@ -22,6 +23,7 @@ public interface ICountryInfo
2223
IReadOnlyList<string> Languages { get; }
2324
}
2425

26+
[DebuggerDisplay("Name='{Iso}', Code='{Iso}'")]
2527
class CountryInfo :
2628
ICountryInfo
2729
{

src/CountryData/Model/Location.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
namespace CountryData
1+
using System.Diagnostics;
2+
3+
namespace CountryData
24
{
35
public interface ILocation
46
{
57
double Latitude { get; }
68
double Longitude { get; }
79
}
810

11+
[DebuggerDisplay("Lat='{Latitude}', Long='{Longitude}'")]
912
class Location :
1013
ILocation
1114
{

src/CountryData/Model/Place.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Runtime.Serialization;
1+
using System.Diagnostics;
2+
using System.Runtime.Serialization;
23
using System.Text.Json.Serialization;
34

45
namespace CountryData
@@ -11,6 +12,7 @@ public interface IPlace
1112
ICommunity Community { get; }
1213
}
1314

15+
[DebuggerDisplay("Name='{Name}', PostCode='{PostCode}'")]
1416
class Place :
1517
IPlace
1618
{

src/CountryData/Model/Province.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Diagnostics;
23
using System.Runtime.Serialization;
34
using System.Text.Json.Serialization;
45

@@ -13,6 +14,7 @@ public interface IProvince
1314
IState State { get; }
1415
}
1516

17+
[DebuggerDisplay("Name='{Name}', Code='{Code}', PostCode='{PostCode}'")]
1618
class Province :
1719
IProvince
1820
{

src/CountryData/Model/State.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Collections.Generic;
2+
using System.Diagnostics;
23
using System.Runtime.Serialization;
34
using System.Text.Json.Serialization;
45

@@ -13,6 +14,7 @@ public interface IState
1314
ICountry Country { get; }
1415
}
1516

17+
[DebuggerDisplay("Name='{Name}', Code='{Code}', PostCode='{PostCode}'")]
1618
class State :
1719
IState
1820
{

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project>
33
<PropertyGroup>
44
<NoWarn>CS1591</NoWarn>
5-
<Version>3.18.0</Version>
5+
<Version>3.19.0</Version>
66
<PackageTags>CountryLocationData, Bogus</PackageTags>
77
</PropertyGroup>
88
</Project>

0 commit comments

Comments
 (0)