Class AddressDistrict
- Namespace
- SIMDispatcher.Core.Models
- Assembly
- SIMDispatcher.Core.dll
Represents a district within a city, including detailed geographic and administrative data. This record extends the AddressCity and provides additional details specific to the district level, such as the district's unique identifier, name, postal code, geographic coordinates, and optional phone prefix.
public record AddressDistrict : AddressCity, IComparable<AddressState>, IEquatable<AddressState>, IComparable<AddressCommune>, IEquatable<AddressCommune>, IComparable<AddressCity>, IComparable, IEquatable<AddressCity>, IComparable<AddressDistrict>, IEquatable<AddressDistrict>
- Inheritance
-
AddressDistrict
- Implements
- Derived
- Inherited Members
Properties
DistrictId
The unique identifier for the district.
public int DistrictId { get; set; }
Property Value
DistrictLat
The latitude coordinate of the district. This geographic detail supports mapping and location-based services. If the specific street coordinates are not available, these coordinates serve as a fallback location.
public double DistrictLat { get; set; }
Property Value
DistrictLng
The longitude coordinate of the district. Alongside latitude, this provides a precise location for the district on global mapping services. Like latitude, longitude will also be used as a fallback if specific street coordinates cannot be found.
public double DistrictLng { get; set; }
Property Value
DistrictName
The name of the district.
public string? DistrictName { get; set; }
Property Value
DistrictPhonePrefix
The phone prefix used within the district. This property can be null if the phone prefix is not applicable or not defined.
public string? DistrictPhonePrefix { get; set; }
Property Value
DistrictZip
The postal code for the district.
public string? DistrictZip { get; set; }
Property Value
Methods
CompareTo(AddressDistrict?)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(AddressDistrict? other)
Parameters
other
AddressDistrictAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes other
in the sort order.Zero This instance occurs in the same position in the sort order as other
.Greater than zero This instance follows other
in the sort order.
CompareTo(object?)
public int CompareTo(object? obj)
Parameters
obj
object
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.