摘要: 创建一个接口,然后提供两个实现的类 需要添加 Microsoft.Extensions.DependencyInjection nuget包的引用 1 void Main() 2 { 3 var provider = new ServiceCollection() 4 .AddScoped<ILog 阅读全文
posted @ 2021-09-15 23:17 shermanli 阅读(1814) 评论(3) 推荐(2)