Implemented CountryDistanceProvider.cs
This commit is contained in:
parent
8a169467c9
commit
a7d1595fae
1 changed files with 7 additions and 3 deletions
|
|
@ -29,9 +29,13 @@ public sealed class CountryDistanceProvider : ICountryDistanceProvider
|
|||
|
||||
public CountryDistanceInformation? GetDistanceTo(string countryName)
|
||||
{
|
||||
// TODO
|
||||
return null!;
|
||||
bool success = distanceDatabase.TryGetValue(countryName, out var distance);
|
||||
return success ? distance : null;
|
||||
}
|
||||
|
||||
public bool IsPossibleCountry(string countryName) => false; // TODO
|
||||
public bool IsPossibleCountry(string countryName)
|
||||
{
|
||||
var country = GetDistanceTo(countryName);
|
||||
return country != null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue