Class Location
Combines a textual address with a GPS point.
public sealed class Location : IEquatable<Location>
- Inheritance
-
Location
- Implements
- Inherited Members
Constructors
Location(Address, GpsPoint)
Combines a textual address with a GPS point.
public Location(Address _address, GpsPoint _point)
Parameters
Properties
Address
Gets the address, or Undefined.
public Address Address { get; }
Property Value
IsAllSet
Gets whether both the GPS point and at least one address part are set.
public bool IsAllSet { get; }
Property Value
IsSet
Gets whether either the GPS point or at least one address part is set.
public bool IsSet { get; }
Property Value
NoLocation
Gets the sentinel location with no address or GPS point.
public static Location NoLocation { get; }
Property Value
Point
Gets the GPS point, or Undefined.
public GpsPoint Point { get; }
Property Value
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(Location)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Location other)
Parameters
otherLocationAn object to compare with this object.
Returns
FromJsonString(string)
Deserializes a location from JSON.
public static Location FromJsonString(string jsonString)
Parameters
jsonStringstring
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToJsonString()
Serializes the location to compact JSON.
public string ToJsonString()
Returns
- string
The serialized location.
ToString()
Serializes the location to indented JSON.
public override string ToString()
Returns
- string
The formatted JSON.