在项目使用分部类,如 Razor、Blazor、Wpf 等项目中,编译会生成 .g.cs 文件,但是因为出现了问题,不能编译成功,查看源代码,找不出错误,只能开始输出 .g.cs ,查看文件进行检查。 <PropertyGroup> <EmitCompilerGenerat[......]继续阅读

2022年10月13日 0条评论 3009点热度 0人点赞 痴者工良 阅读全文

Fast speed and good performance through DNS. dig ANY +short @resolver2.opendns.com myip.opendns.com dig ANY +short @resolver2.opendns.com myip.opendn[......]继续阅读

2022年10月12日 0条评论 1010点热度 0人点赞 痴者工良 阅读全文

通过 DNS 方式,速度快,性能好。 dig ANY +short @resolver2.opendns.com myip.opendns.com dig ANY +short @resolver2.opendns.com myip.opendns.com dig ANY +short @ns1[......]继续阅读

2022年10月12日 0条评论 2648点热度 0人点赞 痴者工良 阅读全文

// json => Dictionary static Dictionary<string, string> Read(string jsonData) { var reader = new Utf8Jso[......]继续阅读

2022年10月10日 0条评论 996点热度 0人点赞 痴者工良 阅读全文

// json => Dictionary static Dictionary<string, string> Read(string jsonData) { var reader = new Utf8Jso[......]继续阅读

2022年10月10日 0条评论 3034点热度 0人点赞 痴者工良 阅读全文

private static void RunPowershellScript(string scriptFile) { ProcessStartInfo ps = new ProcessStartInfo(@"powershell.exe", scriptFile) { Re[......]继续阅读

2022年10月9日 0条评论 1614点热度 0人点赞 痴者工良 阅读全文

private static void RunPowershellScript(string scriptFile) { ProcessStartInfo ps = new ProcessStartInfo(@"powershell.exe",scriptFile) { RedirectSt[......]继续阅读

2022年10月9日 0条评论 3420点热度 0人点赞 痴者工良 阅读全文

using System.Resources; var assembly = typeof(Program).Assembly; ResourceManager resourceManager = new ResourceManager("update[......]继续阅读

2022年10月8日 0条评论 5456点热度 0人点赞 痴者工良 阅读全文

using System.Resources; var assembly = typeof(Program).Assembly; ResourceManager resourceManager = new ResourceManager("update.Prope[......]继续阅读

2022年10月8日 0条评论 7942点热度 0人点赞 痴者工良 阅读全文

Project publish parameters: dotnet publish -c Release -r win-x64 -p:PublishProfile=FolderProfile --no-self-contained dotnet publish -c Release -r wi[......]继续阅读

2022年10月8日 0条评论 6282点热度 2人点赞 痴者工良 阅读全文

项目发布参数: dotnet publish -c Release -r win-x64 -p:PublishProfile=FolderProfile --no-self-contained dotnet publish -c Release -r win-x64 -p:PublishProfi[......]继续阅读

2022年10月8日 0条评论 3972点热度 2人点赞 痴者工良 阅读全文

ASP.NET Core Response.Body is by default an HttpResponseStream, which is characterized by allowing writes only in append mode, and it cannot be read o[......] 继续阅读

2022年9月30日 0条评论 10564点热度 0人点赞 痴者工良 阅读全文

ASP.NET Core Response.Body 默认是 HttpResponseStream,其主要特征是只能追加写,不能读取也不能修改。 所以最根本方法是替换 HttpResponseStream。 随便设置一个中间件,或者将 HttpContext 拿出来,定义变量 context。 替[......] 继续阅读

2022年9月30日 0条评论 4302点热度 0人点赞 痴者工良 阅读全文

When performing unit tests, libraries such as Moq are often used to mock the code. However, in some cases, we want to not only mock methods but also d[......] 继续阅读

2022年9月26日 0条评论 1140点热度 0人点赞 痴者工良 阅读全文

做单元测试的时候往往会使用 Moq 等库,对代码进行 Mock。 但是有些过程,我们希望除了 Mock 方法之外,能够在 Mock 方法中,判断传递的参数是否正确。 因为常规的 Mock ,是返回一个值。 var mock = new Mock<Test>(); mock.Setup&[......]继续阅读

2022年9月26日 0条评论 4374点热度 0人点赞 痴者工良 阅读全文

Windows.ApplicationModel.Package.Current.InstalledLocation.Path [......] 继续阅读

2022年9月23日 0条评论 1064点热度 0人点赞 痴者工良 阅读全文

Windows.ApplicationModel.Package.Current.InstalledLocation.Path [......] 继续阅读

2022年9月23日 0条评论 3264点热度 0人点赞 痴者工良 阅读全文

首先映射是按照块来映射的,每个块内都有一个块内地址,记录每个字长的位置。 本文部分图片来源参考:https://blog.csdn.net/weixin_42649617/article/details/105092395 直接映射 特点是内存与 Cache 之间的映射位置是固定的,其中内存到[......] 继续阅读

2022年9月18日 0条评论 2319点热度 2人点赞 痴者工良 阅读全文

首先映射是按照块来映射的,每个块内都有一个块内地址,记录每个字长的位置。 本文部分图片来源参考:https://blog.csdn.net/weixin_42649617/article/details/105092395 直接映射 特点是内存与 Cache 之间的映射位置是固定的,其中内存到[......] 继续阅读

2022年9月18日 0条评论 7647点热度 2人点赞 痴者工良 阅读全文

Razor Page Field Naming Conventions Component Invocation When a component allows external parameters to be passed, properties must be decorated with [[......] 继续阅读

2022年9月15日 0条评论 1324点热度 0人点赞 痴者工良 阅读全文
1141516171854