上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: HttpClient 》HttpMessageHandler 》HttpMessageHandlerBuilder 》DefaultHttpMessageHandlerBuilder 没有自定义的话,将采取DefaultHttpMessageHandlerBuilder中的实现 HttpMessag 阅读全文
posted @ 2023-03-10 22:03 孤海飞雁 阅读(22) 评论(0) 推荐(0)
摘要: HttpClent 的组成由多个HttpMessageHandle 组成 LifetimeTrackingHttpMessageHandler LoggingScopeHttpMessageHandler LoggingHttpMessageHandler HttpClientHandler这个由 阅读全文
posted @ 2023-03-09 22:06 孤海飞雁 阅读(29) 评论(0) 推荐(0)
摘要: 这些东西以前是知道是什么东西,但是没做记录现在就忘了,还是做下记录好点分布式:将一个大系统分为若干小系统,例如我现在的维护流程系统,简单分 可以流程一个,微信端一个。在细一点,流程后台中流程设计为一个,表单设计一个,前台流程解释执行一个.拆开部署到不同服务器支之间相互访问微服务 :也是将将服务拆分, 阅读全文
posted @ 2023-02-20 22:31 孤海飞雁 阅读(32) 评论(0) 推荐(0)
摘要: 准备要注册的对象 和接口,以及注册的生命周期 准备注册,先检查 是否释放 检测是否 已注册,没有则添加到 集合内并反回对象 创建服务提供工程。初始化容器,根据注入的对象类型选择不同的注册方式 1 通过据提的接口和实现类 2 直接new 对象的 3 通过实例工厂创建 使用 1 的会直接注册委托Crea 阅读全文
posted @ 2023-02-16 22:28 孤海飞雁 阅读(85) 评论(0) 推荐(0)
摘要: 服务的创建在创建对象时有多个构造函数符合条件,会报错System.InvalidOperationException:“Unable to activate type 'App.Qux'. The following constructors are ambiguous:要有唯一的才行 new Se 阅读全文
posted @ 2023-02-15 22:35 孤海飞雁 阅读(30) 评论(0) 推荐(0)
摘要: 服务范围有效性检查var root = new ServiceCollection() .AddSingleton<IFoo, Foo>() .AddScoped<IBar, Bar>() .BuildServiceProvider(true);//是否是单例转为 瞬时或者范围,对服务范围的有效性检 阅读全文
posted @ 2023-02-14 22:13 孤海飞雁 阅读(25) 评论(0) 推荐(0)
摘要: using App; using System.Diagnostics; var cat = new Cat() .Register<IFoo, Foo>(Lifetime.Transient) .Register<IBar, Bar>(Lifetime.Transient) .Register(t 阅读全文
posted @ 2023-02-12 14:05 孤海飞雁 阅读(98) 评论(0) 推荐(0)
摘要: public T Query<T>(int id) where T : BaseModel { Type type = typeof(T); string columnString = string.Join(",", type.GetProperties().Select(p => $"[{p.G 阅读全文
posted @ 2023-02-09 10:12 孤海飞雁 阅读(14) 评论(0) 推荐(0)
摘要: 绑定集合 var source = new Dictionary<string, string> { ["0:gender"] = "Male", //["0:age"] = "18", //["0:contactInfo:emailAddress"] = "foo@outlook.com", // 阅读全文
posted @ 2023-02-02 22:36 孤海飞雁 阅读(59) 评论(0) 推荐(0)
摘要: { // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { 阅读全文
posted @ 2022-11-02 18:37 孤海飞雁 阅读(694) 评论(1) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页