Class BaiduIpLocatorProviderV2
- Namespace
- BootstrapBlazor.Components
- Assembly
- BootstrapBlazor.dll
BaiduIPLocatorV2 第二个版本实现类
public class BaiduIpLocatorProviderV2 : BaiduIpLocatorProvider, IIpLocatorProvider
- Inheritance
-
BaiduIpLocatorProviderV2
- Implements
- Inherited Members
- Extension Methods
Constructors
BaiduIpLocatorProviderV2(IHttpClientFactory, IOptions<BootstrapBlazorOptions>, ILogger<BaiduIpLocatorProvider>)
BaiduIPLocatorV2 第二个版本实现类
public BaiduIpLocatorProviderV2(IHttpClientFactory httpClientFactory, IOptions<BootstrapBlazorOptions> options, ILogger<BaiduIpLocatorProvider> logger)
Parameters
httpClientFactory
IHttpClientFactoryoptions
IOptions<BootstrapBlazorOptions>logger
ILogger<BaiduIpLocatorProvider>
Methods
Fetch(string, HttpClient, CancellationToken)
请求获得地理位置接口方法
protected override Task<string?> Fetch(string url, HttpClient client, CancellationToken token)
Parameters
url
stringclient
HttpClienttoken
CancellationToken
Returns
GetUrl(string)
获得 Url 地址
protected override string GetUrl(string ip)
Parameters
ip
string