Skip to content

Commit 80b70fc

Browse files
committed
ran dotnet format
1 parent 3dae38a commit 80b70fc

76 files changed

Lines changed: 6695 additions & 6690 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/Example.Web/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,4 +260,4 @@ sealed class YahooProviderOptions
260260
{
261261
public String ConsumerKey { get; init; } = String.Empty;
262262
public String ConsumerSecret { get; init; } = String.Empty;
263-
}
263+
}

src/Geocoding.Core/Address.cs

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -6,95 +6,95 @@ namespace Geocoding;
66
/// </summary>
77
public abstract class Address
88
{
9-
string formattedAddress = string.Empty;
10-
Location coordinates;
11-
string provider = string.Empty;
9+
string formattedAddress = string.Empty;
10+
Location coordinates;
11+
string provider = string.Empty;
1212

13-
/// <summary>
14-
/// Initializes a new address instance.
15-
/// </summary>
16-
/// <param name="formattedAddress">The provider formatted address string.</param>
17-
/// <param name="coordinates">The geocoded coordinates.</param>
18-
/// <param name="provider">The provider name that produced this address.</param>
19-
public Address(string formattedAddress, Location coordinates, string provider)
20-
{
21-
FormattedAddress = formattedAddress;
22-
Coordinates = coordinates;
23-
Provider = provider;
24-
}
13+
/// <summary>
14+
/// Initializes a new address instance.
15+
/// </summary>
16+
/// <param name="formattedAddress">The provider formatted address string.</param>
17+
/// <param name="coordinates">The geocoded coordinates.</param>
18+
/// <param name="provider">The provider name that produced this address.</param>
19+
public Address(string formattedAddress, Location coordinates, string provider)
20+
{
21+
FormattedAddress = formattedAddress;
22+
Coordinates = coordinates;
23+
Provider = provider;
24+
}
2525

26-
/// <summary>
27-
/// Gets or sets the full formatted address.
28-
/// </summary>
29-
public virtual string FormattedAddress
30-
{
31-
get { return formattedAddress; }
32-
set
33-
{
34-
if (string.IsNullOrWhiteSpace(value))
35-
throw new ArgumentException("FormattedAddress is null or blank");
26+
/// <summary>
27+
/// Gets or sets the full formatted address.
28+
/// </summary>
29+
public virtual string FormattedAddress
30+
{
31+
get { return formattedAddress; }
32+
set
33+
{
34+
if (string.IsNullOrWhiteSpace(value))
35+
throw new ArgumentException("FormattedAddress is null or blank");
3636

37-
formattedAddress = value.Trim();
38-
}
39-
}
37+
formattedAddress = value.Trim();
38+
}
39+
}
4040

41-
/// <summary>
42-
/// Gets or sets the latitude and longitude for this address.
43-
/// </summary>
44-
public virtual Location Coordinates
45-
{
46-
get { return coordinates; }
47-
set
48-
{
49-
if (value == null)
50-
throw new ArgumentNullException("Coordinates");
41+
/// <summary>
42+
/// Gets or sets the latitude and longitude for this address.
43+
/// </summary>
44+
public virtual Location Coordinates
45+
{
46+
get { return coordinates; }
47+
set
48+
{
49+
if (value == null)
50+
throw new ArgumentNullException("Coordinates");
5151

52-
coordinates = value;
53-
}
54-
}
52+
coordinates = value;
53+
}
54+
}
5555

56-
/// <summary>
57-
/// Gets the provider name for this address.
58-
/// </summary>
59-
public virtual string Provider
60-
{
61-
get { return provider; }
62-
protected set
63-
{
64-
if (string.IsNullOrWhiteSpace(value))
65-
throw new ArgumentException("Provider can not be null or blank");
56+
/// <summary>
57+
/// Gets the provider name for this address.
58+
/// </summary>
59+
public virtual string Provider
60+
{
61+
get { return provider; }
62+
protected set
63+
{
64+
if (string.IsNullOrWhiteSpace(value))
65+
throw new ArgumentException("Provider can not be null or blank");
6666

67-
provider = value;
68-
}
69-
}
67+
provider = value;
68+
}
69+
}
7070

71-
/// <summary>
72-
/// Calculates the distance from this address to another address in miles.
73-
/// </summary>
74-
/// <param name="address">The destination address.</param>
75-
/// <returns>The distance between the two addresses.</returns>
76-
public virtual Distance DistanceBetween(Address address)
77-
{
78-
return this.Coordinates.DistanceBetween(address.Coordinates);
79-
}
71+
/// <summary>
72+
/// Calculates the distance from this address to another address in miles.
73+
/// </summary>
74+
/// <param name="address">The destination address.</param>
75+
/// <returns>The distance between the two addresses.</returns>
76+
public virtual Distance DistanceBetween(Address address)
77+
{
78+
return this.Coordinates.DistanceBetween(address.Coordinates);
79+
}
8080

81-
/// <summary>
82-
/// Calculates the distance from this address to another address.
83-
/// </summary>
84-
/// <param name="address">The destination address.</param>
85-
/// <param name="units">The unit to return the distance in.</param>
86-
/// <returns>The distance between the two addresses.</returns>
87-
public virtual Distance DistanceBetween(Address address, DistanceUnits units)
88-
{
89-
return this.Coordinates.DistanceBetween(address.Coordinates, units);
90-
}
81+
/// <summary>
82+
/// Calculates the distance from this address to another address.
83+
/// </summary>
84+
/// <param name="address">The destination address.</param>
85+
/// <param name="units">The unit to return the distance in.</param>
86+
/// <returns>The distance between the two addresses.</returns>
87+
public virtual Distance DistanceBetween(Address address, DistanceUnits units)
88+
{
89+
return this.Coordinates.DistanceBetween(address.Coordinates, units);
90+
}
9191

92-
/// <summary>
93-
/// Returns the formatted address.
94-
/// </summary>
95-
/// <returns>The formatted address.</returns>
96-
public override string ToString()
97-
{
98-
return FormattedAddress;
99-
}
100-
}
92+
/// <summary>
93+
/// Returns the formatted address.
94+
/// </summary>
95+
/// <returns>The formatted address.</returns>
96+
public override string ToString()
97+
{
98+
return FormattedAddress;
99+
}
100+
}

src/Geocoding.Core/Bounds.cs

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -7,94 +7,94 @@ namespace Geocoding;
77
/// </summary>
88
public class Bounds
99
{
10-
readonly Location southWest;
11-
readonly Location northEast;
10+
readonly Location southWest;
11+
readonly Location northEast;
1212

13-
/// <summary>
14-
/// Gets the southwest corner.
15-
/// </summary>
16-
public Location SouthWest
17-
{
18-
get { return southWest; }
19-
}
13+
/// <summary>
14+
/// Gets the southwest corner.
15+
/// </summary>
16+
public Location SouthWest
17+
{
18+
get { return southWest; }
19+
}
2020

21-
/// <summary>
22-
/// Gets the northeast corner.
23-
/// </summary>
24-
public Location NorthEast
25-
{
26-
get { return northEast; }
27-
}
21+
/// <summary>
22+
/// Gets the northeast corner.
23+
/// </summary>
24+
public Location NorthEast
25+
{
26+
get { return northEast; }
27+
}
2828

29-
/// <summary>
30-
/// Initializes bounds from raw latitude and longitude values.
31-
/// </summary>
32-
/// <param name="southWestLatitude">The southwest latitude.</param>
33-
/// <param name="southWestLongitude">The southwest longitude.</param>
34-
/// <param name="northEastLatitude">The northeast latitude.</param>
35-
/// <param name="northEastLongitude">The northeast longitude.</param>
36-
public Bounds(double southWestLatitude, double southWestLongitude, double northEastLatitude, double northEastLongitude)
37-
: this(new Location(southWestLatitude, southWestLongitude), new Location(northEastLatitude, northEastLongitude)) { }
29+
/// <summary>
30+
/// Initializes bounds from raw latitude and longitude values.
31+
/// </summary>
32+
/// <param name="southWestLatitude">The southwest latitude.</param>
33+
/// <param name="southWestLongitude">The southwest longitude.</param>
34+
/// <param name="northEastLatitude">The northeast latitude.</param>
35+
/// <param name="northEastLongitude">The northeast longitude.</param>
36+
public Bounds(double southWestLatitude, double southWestLongitude, double northEastLatitude, double northEastLongitude)
37+
: this(new Location(southWestLatitude, southWestLongitude), new Location(northEastLatitude, northEastLongitude)) { }
3838

39-
/// <summary>
40-
/// Initializes bounds from two corner locations.
41-
/// </summary>
42-
/// <param name="southWest">The southwest corner.</param>
43-
/// <param name="northEast">The northeast corner.</param>
44-
[JsonConstructor]
45-
public Bounds(Location southWest, Location northEast)
46-
{
47-
if (southWest == null)
48-
throw new ArgumentNullException("southWest");
39+
/// <summary>
40+
/// Initializes bounds from two corner locations.
41+
/// </summary>
42+
/// <param name="southWest">The southwest corner.</param>
43+
/// <param name="northEast">The northeast corner.</param>
44+
[JsonConstructor]
45+
public Bounds(Location southWest, Location northEast)
46+
{
47+
if (southWest == null)
48+
throw new ArgumentNullException("southWest");
4949

50-
if (northEast == null)
51-
throw new ArgumentNullException("northEast");
50+
if (northEast == null)
51+
throw new ArgumentNullException("northEast");
5252

53-
if (southWest.Latitude > northEast.Latitude)
54-
throw new ArgumentException("southWest latitude cannot be greater than northEast latitude");
53+
if (southWest.Latitude > northEast.Latitude)
54+
throw new ArgumentException("southWest latitude cannot be greater than northEast latitude");
5555

56-
this.southWest = southWest;
57-
this.northEast = northEast;
58-
}
56+
this.southWest = southWest;
57+
this.northEast = northEast;
58+
}
5959

60-
/// <summary>
61-
/// Determines whether the specified object is equal to the current bounds.
62-
/// </summary>
63-
/// <param name="obj">The object to compare.</param>
64-
/// <returns><c>true</c> when equal; otherwise <c>false</c>.</returns>
65-
public override bool Equals(object obj)
66-
{
67-
return Equals(obj as Bounds);
68-
}
60+
/// <summary>
61+
/// Determines whether the specified object is equal to the current bounds.
62+
/// </summary>
63+
/// <param name="obj">The object to compare.</param>
64+
/// <returns><c>true</c> when equal; otherwise <c>false</c>.</returns>
65+
public override bool Equals(object obj)
66+
{
67+
return Equals(obj as Bounds);
68+
}
6969

70-
/// <summary>
71-
/// Determines whether another bounds instance is equal to the current one.
72-
/// </summary>
73-
/// <param name="bounds">The other bounds instance.</param>
74-
/// <returns><c>true</c> when equal; otherwise <c>false</c>.</returns>
75-
public bool Equals(Bounds bounds)
76-
{
77-
if (bounds == null)
78-
return false;
70+
/// <summary>
71+
/// Determines whether another bounds instance is equal to the current one.
72+
/// </summary>
73+
/// <param name="bounds">The other bounds instance.</param>
74+
/// <returns><c>true</c> when equal; otherwise <c>false</c>.</returns>
75+
public bool Equals(Bounds bounds)
76+
{
77+
if (bounds == null)
78+
return false;
7979

80-
return (this.SouthWest.Equals(bounds.SouthWest) && this.NorthEast.Equals(bounds.NorthEast));
81-
}
80+
return (this.SouthWest.Equals(bounds.SouthWest) && this.NorthEast.Equals(bounds.NorthEast));
81+
}
8282

83-
/// <summary>
84-
/// Returns a hash code for the current bounds.
85-
/// </summary>
86-
/// <returns>A hash code for the current bounds.</returns>
87-
public override int GetHashCode()
88-
{
89-
return SouthWest.GetHashCode() ^ NorthEast.GetHashCode();
90-
}
83+
/// <summary>
84+
/// Returns a hash code for the current bounds.
85+
/// </summary>
86+
/// <returns>A hash code for the current bounds.</returns>
87+
public override int GetHashCode()
88+
{
89+
return SouthWest.GetHashCode() ^ NorthEast.GetHashCode();
90+
}
9191

92-
/// <summary>
93-
/// Returns a string representation of the bounds.
94-
/// </summary>
95-
/// <returns>A string representation of the bounds.</returns>
96-
public override string ToString()
97-
{
98-
return string.Format("{0} | {1}", southWest, northEast);
99-
}
100-
}
92+
/// <summary>
93+
/// Returns a string representation of the bounds.
94+
/// </summary>
95+
/// <returns>A string representation of the bounds.</returns>
96+
public override string ToString()
97+
{
98+
return string.Format("{0} | {1}", southWest, northEast);
99+
}
100+
}

0 commit comments

Comments
 (0)