-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathIpLocalizationService.cs
More file actions
39 lines (35 loc) · 1019 Bytes
/
IpLocalizationService.cs
File metadata and controls
39 lines (35 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace Waher.Security.WAF.Test
{
public class IpLocalizationService : IEndpointLocalizationService, IEndpointLocalization
{
private static string countryCode;
private static string country;
private static string region;
private static string city;
private static double latitude;
private static double longitude;
public IpLocalizationService()
{
}
public string CountryCode => countryCode;
public string Country => country;
public string Region => region;
public string City => city;
public double Latitude => latitude;
public double Longitude => longitude;
public static void SetLocation(string CountryCode, string Country, string Region,
string City, double Latitude, double Longitude)
{
countryCode = CountryCode;
country = Country;
region = Region;
city = City;
latitude = Latitude;
longitude = Longitude;
}
public Task<IEndpointLocalization> TryGetLocation(string Endpoint)
{
return Task.FromResult<IEndpointLocalization>(this);
}
}
}