摘要: internal class Program { static async Task Main(string[] args) { var filters = new List<IFilter> { new FilterA(), new FilterB(), }; Func<BackgroundJob 阅读全文
posted @ 2024-10-26 14:58 pojianbing 阅读(2) 评论(0) 推荐(0) 编辑
摘要: internal class Program { static async Task Main(string[] args) { var list = new List<int>() { 1, 2, 3, 4, 5, 6, 7, }; var res = Pairwise<int, string>( 阅读全文
posted @ 2024-10-26 11:48 pojianbing 阅读(4) 评论(0) 推荐(0) 编辑
摘要: internal class Program { static void Main(string[] args) { var sTotal = 1; var total = 100; for (var t = sTotal; t <= total; t++) { for (var i = 1; i 阅读全文
posted @ 2024-10-25 15:34 pojianbing 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 创建控制台项目 使用类库项目,.net standard.2.0 nuget安装RazorGenerator.MsBuild 这样在项目的packages目录能看到RazorGenerator.MsBuild.2.5.0 razor页类定义 namespace RazorLib { public a 阅读全文
posted @ 2024-10-24 17:08 pojianbing 阅读(5) 评论(0) 推荐(0) 编辑
摘要: public class BinarSearchTree { private Node _tree; public BinarSearchTree(List<int> datas) { if (datas != null) { foreach (var item in datas) { Insert 阅读全文
posted @ 2024-10-19 14:22 pojianbing 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 创建Razor页面类库 创建Razor类库,命名为: DemoPlugin2 生成controller和razor页面 Plugin2Controller public class Plugin2Controller : Controller { public IActionResult Hello 阅读全文
posted @ 2024-10-16 16:20 pojianbing 阅读(2) 评论(0) 推荐(0) 编辑
摘要: PermissionRequirement public class PermissionRequirement : AuthorizationHandler<PermissionRequirement>, IAuthorizationRequirement { public string Perm 阅读全文
posted @ 2024-10-08 16:20 pojianbing 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Program internal class Program { static async Task Main(string[] args) { DbContextOptionsBuilder<BloggingContext> optionsBuilder = new DbContextOption 阅读全文
posted @ 2024-10-07 16:30 pojianbing 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 读取固定长度 private static byte[] ReadBytes(Stream stream, int count) { var output = new byte[count]; var total = 0; while (total < count) { var read = str 阅读全文
posted @ 2024-09-30 17:47 pojianbing 阅读(3) 评论(0) 推荐(0) 编辑
摘要: using System.Security.Cryptography; using System.Text; namespace ConsoleApp7 { internal class Program { static void Main(string[] args) { var servers 阅读全文
posted @ 2024-09-26 16:09 pojianbing 阅读(3) 评论(0) 推荐(0) 编辑