类型重命名
This commit is contained in:
parent
82a816e40d
commit
bd4133aa2c
@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>1.0.7</Version>
|
||||
<Version>1.0.8</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<Description>github加速神器</Description>
|
||||
<Copyright>https://github.com/xljiulang/FastGithub</Copyright>
|
||||
|
||||
@ -17,7 +17,7 @@ namespace FastGithub.Dns
|
||||
sealed class DnsServerHostedService : BackgroundService
|
||||
{
|
||||
private readonly RequestResolver requestResolver;
|
||||
private readonly HostsValidator hostsValidator;
|
||||
private readonly HostsFileValidator hostsValidator;
|
||||
private readonly ILogger<DnsServerHostedService> logger;
|
||||
|
||||
private readonly Socket socket = new(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
@ -33,7 +33,7 @@ namespace FastGithub.Dns
|
||||
/// <param name="logger"></param>
|
||||
public DnsServerHostedService(
|
||||
RequestResolver requestResolver,
|
||||
HostsValidator hostsValidator,
|
||||
HostsFileValidator hostsValidator,
|
||||
IOptionsMonitor<FastGithubOptions> options,
|
||||
ILogger<DnsServerHostedService> logger)
|
||||
{
|
||||
|
||||
@ -17,7 +17,7 @@ namespace FastGithub
|
||||
{
|
||||
return services
|
||||
.AddSingleton<RequestResolver>()
|
||||
.AddSingleton<HostsValidator>()
|
||||
.AddSingleton<HostsFileValidator>()
|
||||
.AddHostedService<DnsServerHostedService>();
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,19 +12,19 @@ namespace FastGithub.Dns
|
||||
/// <summary>
|
||||
/// host文件配置验证器
|
||||
/// </summary>
|
||||
sealed class HostsValidator
|
||||
sealed class HostsFileValidator
|
||||
{
|
||||
private readonly FastGithubConfig fastGithubConfig;
|
||||
private readonly ILogger<HostsValidator> logger;
|
||||
private readonly ILogger<HostsFileValidator> logger;
|
||||
|
||||
/// <summary>
|
||||
/// host文件配置验证器
|
||||
/// </summary>
|
||||
/// <param name="fastGithubConfig"></param>
|
||||
/// <param name="logger"></param>
|
||||
public HostsValidator(
|
||||
public HostsFileValidator(
|
||||
FastGithubConfig fastGithubConfig,
|
||||
ILogger<HostsValidator> logger)
|
||||
ILogger<HostsFileValidator> logger)
|
||||
{
|
||||
this.fastGithubConfig = fastGithubConfig;
|
||||
this.logger = logger;
|
||||
Loading…
Reference in New Issue
Block a user