首先在 router/index.ts 中创建对应的路由。 const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: [ { path: '/',[......]继续阅读
首先在 router/index.ts 中创建对应的路由。 const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: [ { path: '/',[......]继续阅读
First, create the corresponding routes in router/index.ts. const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), rou[......]继续阅读
在 signalR 中如需获取客户端的连接信息,可以使用 IHttpConnectionFeature 获取客户端通讯的 IP 和端口。 // 获取服务 var feature = Context.Features.Get<IHttpConnec[......]继续阅读
In SignalR, to obtain the client's connection information, you can use IHttpConnectionFeature to retrieve the client's communication IP and port. [......]继续阅读
Fast speed and good performance through DNS. dig ANY +short @resolver2.opendns.com myip.opendns.com dig ANY +short @resolver2.opendns.com myip.opendn[......]继续阅读
通过 DNS 方式,速度快,性能好。 dig ANY +short @resolver2.opendns.com myip.opendns.com dig ANY +short @resolver2.opendns.com myip.opendns.com dig ANY +short @ns1[......]继续阅读
using System.Resources; var assembly = typeof(Program).Assembly; ResourceManager resourceManager = new ResourceManager("update[......]继续阅读
using System.Resources; var assembly = typeof(Program).Assembly; ResourceManager resourceManager = new ResourceManager("update.Prope[......]继续阅读
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[......] 继续阅读
做单元测试的时候往往会使用 Moq 等库,对代码进行 Mock。 但是有些过程,我们希望除了 Mock 方法之外,能够在 Mock 方法中,判断传递的参数是否正确。 因为常规的 Mock ,是返回一个值。 var mock = new Mock<Test>(); mock.Setup&[......]继续阅读
Windows.ApplicationModel.Package.Current.InstalledLocation.Path [......] 继续阅读
What to Write Not long ago, I wrote a project using C#, which utilizes the Kubernetes API Server to retrieve information and monitor Kubernetes resour[......] 继续阅读
写什么呢 前段时间使用 C# 写了个项目,使用 Kubernetes API Server,获取信息以及监控 Kubernetes 资源,然后结合 Neting 做 API 网关。 体验地址 http://neting.whuanle.cn:30080/ 账号 admin,密码 admin123 [......] 继续阅读
ASP.NET Core provides the ConfigurationBuilder object for building configurations. It mainly consists of three steps: configuring the data source ->[......] 继续阅读
ASP.NET Core 中,可以使用 ConfigurationBuilder 对象来构建。 主要分为三部:配置数据源 -> ConfigurationBuilder -> 使用。 数据源可来自字典或配置文件。 数据源要么继承 IConfigurationSource ,要么从配置文件[......] 继续阅读
支持 Windows 和 Linux var macAddr = ( from nic in NetworkInterface.GetAllNetworkInterfaces()[......]继续阅读
Supports Windows and Linux var macAddr = ( from nic in NetworkInterface.GetAllNetworkInterfaces()[......]继续阅读
简介 CZGL.SystemInfo 是一个支持 Windows 和 Linux 的资源信息获取库,用于获取系统环境、机器资源信息、系统资源使用情况。 Nuget 搜索 CZGL.SystemInfo 即可安装。 类库中每一个属性和方法,我都加上了注释,调用时可以看得到。 平台通用 CZGL.Sys[......] 继续阅读
Introduction CZGL.SystemInfo is a resource information retrieval library that supports Windows and Linux, used to obtain system environment, machine r[......] 继续阅读