随笔分类 -  .NET

1 2 3 4 5 ··· 12 下一页
摘要:前言 定义一套支持自定义数据类型的变量管理功能。 通过自定义组件、自定义活动的方式来实现业务组件与工作流组件逻辑分离。 业务组件可以通过不同的版本来保障业务不受更新影响。 备注 如果需要封装类似循环这一类组件时可以使用 context.ScheduleActivities(WhileBody, On 阅读全文
posted @ 2026-01-30 13:17 Hey,Coder! 阅读(5) 评论(0) 推荐(0)
摘要:var interpreter = new Interpreter(); interpreter.Eval("leftValue/rightValue", new Parameter("leftValue", 2), new Parameter("rightValue", 3) ); 阅读全文
posted @ 2026-01-29 15:19 Hey,Coder! 阅读(3) 评论(0) 推荐(0)
摘要:nuget Elsa 3.5.3 依赖注入 builder.Services.AddElsa(); 基础流程创建 //需要注入对象 IWorkflowRunner workflowRunner; //顺序工作流 var workflow = new Sequence(); workflow.Acti 阅读全文
posted @ 2026-01-21 16:59 Hey,Coder! 阅读(9) 评论(0) 推荐(0)
摘要:编写job 在Execute中添加定时任务的逻辑 public class ScheduleJob : IJob { /// <summary> /// /// </summary> /// <param name="context"></param> /// <returns></returns> 阅读全文
posted @ 2026-01-05 15:36 Hey,Coder! 阅读(6) 评论(0) 推荐(0)
摘要:需求:获取数据库中的所有数据,然后触发页面逻辑重新保存。 加载数据库中的所有数据 循环加载数据 页面加载成功后点击触发保存 切换下一条数据 using CefSharp; using CefSharp.Handler; using CefSharp.Wpf; using System; using 阅读全文
posted @ 2025-12-26 15:06 Hey,Coder! 阅读(7) 评论(0) 推荐(0)
摘要:public static T JsonDeepTo<T>(this object obj) { switch (obj) { case null: return default; case JsonElement element: var jsonStr = element.GetRawText( 阅读全文
posted @ 2025-11-25 12:42 Hey,Coder! 阅读(7) 评论(0) 推荐(0)
摘要:原理 应用程序调用 GetSchemaTable() ↓ ADO.NET 驱动程序生成元数据查询SQL ↓ 发送到数据库服务器执行 ↓ 数据库返回结果集架构信息(不包含实际数据) ↓ ADO.NET 解析架构信息并构建 DataTable ↓ 返回包含完整列信息的 DataTable sqlsuga 阅读全文
posted @ 2025-11-21 22:06 Hey,Coder! 阅读(10) 评论(0) 推荐(0)
摘要:public static class DistinctEx { /// <summary> /// 根据指定字段去重 /// </summary> /// <typeparam name="TSource"></typeparam> /// <typeparam name="TKey"></typ 阅读全文
posted @ 2025-11-04 14:27 Hey,Coder! 阅读(8) 评论(0) 推荐(0)
摘要:private SqlSugarClient GetDB() { SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = "Host=127.0.0.1;Database=test;User 阅读全文
posted @ 2025-10-13 15:01 Hey,Coder! 阅读(52) 评论(0) 推荐(0)
摘要:public static List<dynamic> OrderByKey (this IList<dynamic> list, string propertyName, bool isDescending = false) { var propertyInfo = list[0].GetType 阅读全文
posted @ 2025-09-25 13:27 Hey,Coder! 阅读(17) 评论(0) 推荐(0)
摘要://测试类 var type = typeof(TestClass); //给类对象添加、获取特性 TypeDescriptor.AddAttributes(type, indexAttr); //var attr = TypeDescriptor.GetAttributes(type)[typeo 阅读全文
posted @ 2025-09-22 17:50 Hey,Coder! 阅读(27) 评论(0) 推荐(0)
摘要:public static class FileSafeWrite { public static void WriteAllTextAtomically(string filePath, string content) { // 定义临时文件路径 string tempFilePath = fil 阅读全文
posted @ 2025-09-22 15:05 Hey,Coder! 阅读(28) 评论(0) 推荐(1)
摘要:using System.Collections.Concurrent; internal class Program { static void Main(string[] args) { ConcurrentDictionary<string, RedisConnection> redisCon 阅读全文
posted @ 2025-09-16 18:59 Hey,Coder! 阅读(13) 评论(0) 推荐(0)
摘要:client = new RestClient(new RestClientOptions { RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true }); 阅读全文
posted @ 2025-09-04 21:21 Hey,Coder! 阅读(22) 评论(0) 推荐(0)
摘要:webView.CoreWebView2.ServerCertificateErrorDetected += WebView_ServerCertificateErrorDetected; private void WebView_ServerCertificateErrorDetected(obj 阅读全文
posted @ 2025-09-04 21:20 Hey,Coder! 阅读(45) 评论(0) 推荐(0)
摘要:功能 在程序运行前加载特定的dll 配置环境变量 DOTNET_STARTUP_HOOKS=/path/to/StartupHook1.dll:/path/to/StartupHook2.dll dll代码示例 internal class StartupHook { public static v 阅读全文
posted @ 2025-08-12 11:23 Hey,Coder! 阅读(21) 评论(0) 推荐(0)
摘要:将代码编译都内存对象中,保存编译后的类型到文件或者数据库中直接加载运行 阅读全文
posted @ 2025-08-07 18:23 Hey,Coder! 阅读(26) 评论(0) 推荐(0)
摘要:nuget <PackageReference Include="LiveCharts.Wpf.Core" Version="0.9.8" /> <PackageReference Include="PropertyChanged.Fody" Version="4.1.0" /> Customers 阅读全文
posted @ 2025-07-31 19:11 Hey,Coder! 阅读(92) 评论(0) 推荐(0)
摘要:<lvc:CartesianChart LegendLocation="None" > <lvc:CartesianChart.Series > <lvc:LineSeries Fill="Transparent" Values="{Binding TestValue}" Title="test" 阅读全文
posted @ 2025-07-18 17:26 Hey,Coder! 阅读(24) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; public class LinuxHelper { public string GetCpu() { var r 阅读全文
posted @ 2025-07-11 10:16 Hey,Coder! 阅读(87) 评论(0) 推荐(0)

1 2 3 4 5 ··· 12 下一页