moxixuan
moxixuan
it that possible default System.Data.SqlClient, but can new Microsoft.Data.SqlClient like this ? ``` public static IGlobalConfiguration UseSqlServerStorage([NotNull] this IGlobalConfiguration configuration, [NotNull] Func connectionFactory, [NotNull] SqlServerStorageOptions options) { if (configuration ==...
i have save question. i create a producer each time when produce a message now, but it inefficient https://github.com/confluentinc/confluent-kafka-dotnet/issues/159
I have a similar question.   (venv) (base) ➜ ComfyUI git:(master) ✗ python main.py ** ComfyUI start up time: 2023-12-05 08:45:24.199387 Prestartup times for custom nodes: 0.0 seconds: /Users/moxixuan/Code/ComfyUI/custom_nodes/ComfyUI-Manager...
> > > 用 TryRegister 呢? 你的意思是注册失败的异常都不处理吗?
> > > 注册 SqlConnection 对象,会并发访问同一个 key 吗? 是的,有可能(虽然出现的次数不多),我观察生产环境的日志,有看到这个异常 TakeOutGD 注册失败,请勿重复注册 ReuqestId: c8ac5f66fe014848 at IdleBus2.InternalRegister(TKey key, Func1 create, Nullable1 idle, Boolean isThrow) at IdleBus2.Register(TKey key, Func1 create) at MeiYiJia.TakeOut.Mall.Dapper.IdleBusExtensions.GetSqlConnectionByCompanyCode(IdleBus1 idleBus,...
> > > > > 用 TryRegister 呢? > > > > > > 你的意思是注册失败的异常都不处理吗? > > 是的,只注册一次 但是这边有可能是其他的原因引起的注册失败,我是不是要捕捉到具体的错误,根据不同的情况处理?
> > > 你可能理解错意思了,IdleBus是把一个对象重复使用,如果会并发访问 key 对应的实例,是不适合用的。 > > 简单点说,一个 SqlConnection 实例不支持并发访问。 我这边只是使用了static ```csharp public static SqlConnection GetSqlConnectionByCompanyCode(this IdleBus idleBus , string connectionStringTemplate , string companyCode) { if (!idleBus.Exists($"TakeOut{companyCode}")) { var...
> > > 你需要延迟释放 SqlConnection 吗,个人觉得 IdleBus 不适合你的场景。上面已经解释了原因 这边不需要延迟释放 SqlConnection 的,这个封装的方法,主要是判断一下IdleBus 是否有这个key,如果有的话,直接返回SqlConnection (这是大多数情况)但是在第一次注册的时候,有可能会同时注册的情况,我现在通过 ```csharp public static SqlConnection GetSqlConnectionByCompanyCode(this IdleBus idleBus , string connectionStringTemplate , string companyCode) { if (!idleBus.Exists($"TakeOut{companyCode}")) {...
> Can you display WebView without Dock ? Yes, I can display the WebView without Dock.   When I drag the DocumentView that contains the WebView control, the styling...
> [@moxixuan](https://github.com/moxixuan) Please check https://github.com/wieslawsoltes/Dock/tree/master/samples/WebViewSample请检查 https://github.com/wieslawsoltes/Dock/tree/master/samples/WebViewSample Thank you very much, I verified that it works fine on windows as well