
Get the IP geographic location
More for system log tracking and analysis
The injection service displays client geographic location information
Demo
Introduction to usage
The component uses the injection service IIPLocatorProvider
call the Locate
method
[Inject]
[NotNull]
private IIPLocatorProvider? IPLocator { get; set; }
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance)
Extend the custom geo-location query interface
1. Implement a custom locator
private class CustomerLocator : IIPLocator
{
public Task<string> Locate(IPLocatorOption option)
{
throw new NotImplementedException();
}
}
2. Configure a custom locator
public void ConfigureServices(IServiceCollection services)
{
services.AddBootstrapBlazor(locatorAction: option =>
{
option.LocatorFactory = provider => new CustomerLocator();
});
}
112.224.74.239
Jinan City, Shandong Province Unicom183.160.236.53
Hefei, Anhui Province, telecommunicationsB station related video link
交流群