1 Star 0 Fork 15

一级码农/FastGithub

forked from vscene/FastGithub 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DnsServiceCollectionExtensions.cs 911 Bytes
一键复制 编辑 原始数据 按行查看 历史
jiulang 提交于 2021-06-16 00:14 . fix bug
using FastGithub.Dns;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace FastGithub
{
/// <summary>
/// 服务注册扩展
/// </summary>
public static class DnsServiceCollectionExtensions
{
/// <summary>
/// 注册github的dns服务
/// </summary>
/// <param name="services"></param>
/// <param name="configuration">配置</param>
/// <returns></returns>
public static IServiceCollection AddGithubDns(this IServiceCollection services, IConfiguration configuration)
{
var assembly = typeof(DnsServiceCollectionExtensions).Assembly;
return services
.AddServiceAndOptions(assembly, configuration)
.AddHostedService<DnsHostedService>()
.AddGithubScanner(configuration);
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/bonn_admin/FastGithub.git
git@gitee.com:bonn_admin/FastGithub.git
bonn_admin
FastGithub
FastGithub
master

搜索帮助