类型重命名

This commit is contained in:
xljiulang 2021-07-24 04:13:06 +08:00
parent 82a816e40d
commit bd4133aa2c
4 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<Version>1.0.7</Version> <Version>1.0.8</Version>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Description>github加速神器</Description> <Description>github加速神器</Description>
<Copyright>https://github.com/xljiulang/FastGithub</Copyright> <Copyright>https://github.com/xljiulang/FastGithub</Copyright>

View File

@ -17,7 +17,7 @@ namespace FastGithub.Dns
sealed class DnsServerHostedService : BackgroundService sealed class DnsServerHostedService : BackgroundService
{ {
private readonly RequestResolver requestResolver; private readonly RequestResolver requestResolver;
private readonly HostsValidator hostsValidator; private readonly HostsFileValidator hostsValidator;
private readonly ILogger<DnsServerHostedService> logger; private readonly ILogger<DnsServerHostedService> logger;
private readonly Socket socket = new(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); private readonly Socket socket = new(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
@ -33,7 +33,7 @@ namespace FastGithub.Dns
/// <param name="logger"></param> /// <param name="logger"></param>
public DnsServerHostedService( public DnsServerHostedService(
RequestResolver requestResolver, RequestResolver requestResolver,
HostsValidator hostsValidator, HostsFileValidator hostsValidator,
IOptionsMonitor<FastGithubOptions> options, IOptionsMonitor<FastGithubOptions> options,
ILogger<DnsServerHostedService> logger) ILogger<DnsServerHostedService> logger)
{ {

View File

@ -17,7 +17,7 @@ namespace FastGithub
{ {
return services return services
.AddSingleton<RequestResolver>() .AddSingleton<RequestResolver>()
.AddSingleton<HostsValidator>() .AddSingleton<HostsFileValidator>()
.AddHostedService<DnsServerHostedService>(); .AddHostedService<DnsServerHostedService>();
} }
} }

View File

@ -12,19 +12,19 @@ namespace FastGithub.Dns
/// <summary> /// <summary>
/// host文件配置验证器 /// host文件配置验证器
/// </summary> /// </summary>
sealed class HostsValidator sealed class HostsFileValidator
{ {
private readonly FastGithubConfig fastGithubConfig; private readonly FastGithubConfig fastGithubConfig;
private readonly ILogger<HostsValidator> logger; private readonly ILogger<HostsFileValidator> logger;
/// <summary> /// <summary>
/// host文件配置验证器 /// host文件配置验证器
/// </summary> /// </summary>
/// <param name="fastGithubConfig"></param> /// <param name="fastGithubConfig"></param>
/// <param name="logger"></param> /// <param name="logger"></param>
public HostsValidator( public HostsFileValidator(
FastGithubConfig fastGithubConfig, FastGithubConfig fastGithubConfig,
ILogger<HostsValidator> logger) ILogger<HostsFileValidator> logger)
{ {
this.fastGithubConfig = fastGithubConfig; this.fastGithubConfig = fastGithubConfig;
this.logger = logger; this.logger = logger;