---
title: "Edward Chu (@HoneyMai) | Hashnode"
description: "Focus Focus Focus. Read the latest articles by Edward Chu on Hashnode."
url: "https://hashnode.com/@HoneyMai"
---

@HoneyMai

# Edward Chu

@HoneyMai · Joined June 2022

Focus Focus Focus

### [C# 标准性能测试高级用法（Benchmark）](https://edwardchu.hashnode.dev/c-benchmark-1?utm_source=hashnode&utm_medium=feed)

在 C# 标准性能测试 已经告诉大家如何使用 BenchmarkDotNet 测试性能，本文会告诉大家高级的用法。 建议是创建一个控制台项目用来做性能测试，这个项目要求是 dotnet framework 4.6 以上，建议是 dotnet 7 的版本。使用这个项目引用需要测试的项目，然后在里面写测试的代码。 例如被测试项目有一个类 Foo 里面有一个叫 Lindexidb 的方法，接下来的任务是需要测试这个 Lindexidb 方法的性能 最简单的测试的代码 public class FooP...

7 min read · [edwardchu.hashnode.dev](https://edwardchu.hashnode.dev/c-benchmark-1?utm_source=hashnode&utm_medium=feed)

[Jan 9, 2024](https://hashnode.com/posts/c-benchmark-1/659d55214f0d06e63330d233)

### [.NetCore 实践——HttpClientFactory\[一\]](https://edwardchu.hashnode.dev/netcore-httpclientfactory?utm_source=hashnode&utm_medium=feed)

HttpClientFactory介绍 HttpClientFactory 主要有下面的功能： 管理内部HttpMessageHandler 的生命周期，灵活应对资源问题和DNS刷新问题 支持命名话、类型化配置，集中管理配置，避免冲突。 灵活的出站请求管道配置，轻松管理请求生命周期 内置管道最外层和最内层日志记录器，有information 和 Trace 输出 核心对象： HttpClient HttpMessageHandler SocketsHttpHandler De...

5 min read · [edwardchu.hashnode.dev](https://edwardchu.hashnode.dev/netcore-httpclientfactory?utm_source=hashnode&utm_medium=feed)

[Jan 9, 2024](https://hashnode.com/posts/netcore-httpclientfactory/659d551f9abad10668947e53)

### [认识 MSBuild - 1](https://edwardchu.hashnode.dev/msbuild-1?utm_source=hashnode&utm_medium=feed)

前言 很多人一谈到 MSBuild，脑子里就会出现 “XML”、“只能用 VS 的属性框图形界面操作”、“可定制性和扩展性差” 和 “性能低” 等印象，但实际上这些除了 “XML” 之外完全都是刻板印象：这些人用着 Visual Studio 提供的图形界面，就完全不愿意花个几分钟时间翻翻文档去理解 MSBuild 及其构建过程。 另外，再加上 vcxproj （Visual C++ 项目）的默认 MSBuild 构建文件写得确实谈不上好（默认只能项目粒度并行编译，想要源码级并行编译你得加钱），...

5 min read · [edwardchu.hashnode.dev](https://edwardchu.hashnode.dev/msbuild-1?utm_source=hashnode&utm_medium=feed)

[Jan 9, 2024](https://hashnode.com/posts/msbuild-1/659d551d190dd4394ddc5929)

### [.NetCore实战——工作单元模式（UnitOfWork）：管理好你的事务](https://edwardchu.hashnode.dev/netcoreunitofwork?utm_source=hashnode&utm_medium=feed)

工作单元模式有如下几个特性： 1、使用同一上下文 2、跟踪实体的状态 3、保障事务一致性 我们对实体的操作，最终的状态都是应该如实保存到我们的存储中，进行持久化 接下来看一下代码 为了实现工作单元模式，这里定义了一个工作单元的接口 public interface IUnitOfWork : IDisposable { Task<int> SaveChangesAsync(CancellationToken cancellationToken = default); Task<b...

2 min read · [edwardchu.hashnode.dev](https://edwardchu.hashnode.dev/netcoreunitofwork?utm_source=hashnode&utm_medium=feed)

[Jan 9, 2024](https://hashnode.com/posts/netcoreunitofwork/659d551b22bd199f1cc1d8e6)

### [.NET 8.0中使用MiniProfiler监控数据库查询](https://edwardchu.hashnode.dev/net-80miniprofiler-1?utm_source=hashnode&utm_medium=feed)

返回不同数据库类型的IDBConnection https://github.com/MiniProfiler/dotnet/issues/439 实践记录：Type.GetType()返回值为null的问题 Type.GetType()跨程序集反射 StackExchange.Profiling.Data..ProfiledDbConnection.WrappedConnection 获取未经MiniProfile包装的原IDbConnection // ProfiledDbCo...

1 min read · [edwardchu.hashnode.dev](https://edwardchu.hashnode.dev/net-80miniprofiler-1?utm_source=hashnode&utm_medium=feed)

[Jan 9, 2024](https://hashnode.com/posts/net-80miniprofiler-1/659d55180ff7c1bdf77c456a)
