Table of Contents

Class JuHeIpLocatorProvider

Namespace
BootstrapBlazor.Components
Assembly
BootstrapBlazor.dll

聚合搜索引擎 IP 定位器

public class JuHeIpLocatorProvider : DefaultIpLocatorProvider, IIpLocatorProvider
Inheritance
JuHeIpLocatorProvider
Implements
Inherited Members
Extension Methods

Constructors

JuHeIpLocatorProvider(IHttpClientFactory, IConfiguration, IOptions<BootstrapBlazorOptions>, ILogger<JuHeIpLocatorProvider>)

聚合搜索引擎 IP 定位器

public JuHeIpLocatorProvider(IHttpClientFactory httpClientFactory, IConfiguration configuration, IOptions<BootstrapBlazorOptions> options, ILogger<JuHeIpLocatorProvider> logger)

Parameters

httpClientFactory IHttpClientFactory
configuration IConfiguration
options IOptions<BootstrapBlazorOptions>
logger ILogger<JuHeIpLocatorProvider>

Methods

Fetch(string, HttpClient, CancellationToken)

请求获得地理位置接口方法

protected virtual Task<string?> Fetch(string url, HttpClient client, CancellationToken token)

Parameters

url string
client HttpClient
token CancellationToken

Returns

Task<string>

LocateByIp(string)

内部定位方法

protected override Task<string?> LocateByIp(string ip)

Parameters

ip string

Returns

Task<string>