浅入 AutoMapper AutoMapper 基本使用 映射配置 映射检查 性能 Profile 配置 依赖注入 表达式与 DTO [......] 继续阅读

2020年12月19日 1条评论 4758点热度 0人点赞 痴者工良 阅读全文

1. Available versions and reference materials 2. ValueTask<TResult> and Task 3. How does the compiler compile 4. What are the advantages of ValueTask 5. ValueTask creates an asynchronous task 6. IValueTaskSource and custom packaging ValueTask About IValu…

2020年12月16日 0条评论 1626点热度 0人点赞 痴者工良 阅读全文

1. Available versions and reference materials 2. ValueTask<TResult> and Task 3. How does the compiler compile 4. What are the advantages of ValueTask 5. ValueTask creates an asynchronous task 6. IValueTaskSource and custom packaging ValueTask About IValu…

2020年12月16日 0条评论 4270点热度 0人点赞 痴者工良 阅读全文

table of Contents: 1. File operations 2. Debug, Trace category 3. Conditional compilation 4. MethodImpl feature 5. CLSComplianAttribute 6. If necessary, customize the type alias Recently, I am reading the source code of .NET Core Runtime, refer to the code of …

2020年12月16日 0条评论 1200点热度 0人点赞 痴者工良 阅读全文

table of Contents: File operations Debug, Trace category Conditional compilation MethodImpl feature CLSComplianAttribute If necessary, customize the type alias Recently, I am reading the source code of .NET Core Runtime, refer to the code of the boss, learn wr…

2020年12月16日 0条评论 4286点热度 0人点赞 痴者工良 阅读全文

Table of Contents: File Operations Debug and Trace Classes Conditional Compilation MethodImpl Attribute CLSComplianceAttribute Custom Type Aliases When Necessary I have recently been reading the source code of .NET Core Runtime, referencing the code of experts…

2020年12月15日 1条评论 1326点热度 2人点赞 痴者工良 阅读全文

目录: 1,文件操作 2,Debug、Trace类 3,条件编译 4,MethodImpl 特性 5,CLSComplianAttribute 6,必要时自定义类型别名 最近在阅读 .NET Core Runtime 的源码,参考大佬的代码,学习编写技巧和提高代码水平。学习过程中将学习心得和值得应用到项目中的代码片段记录下来,供日后查阅。 1,文件操作 这段代码在 System.Private.CoreLib 下,对 System.IO.File 中的代码进行精简,供 CLR 使用。 当使用文件时,要提前判断文件路…

2020年12月15日 1条评论 5526点热度 2人点赞 痴者工良 阅读全文

Microsoft's official Docker images cannot run EFCore directly, resulting in the following exception: System.TypeInitializationException: The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. ---> System.Reflection.TargetInvoc…

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

Microsoft 官方的 Docker 镜像不能直接运行 EFCore,会出现异常: System.TypeInitializationException: The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by th…

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

1. Available Versions and References 2. ValueTask<TResult> and Task 3. How the Compiler Compiles 4. What Are the Advantages of ValueTask 5. Creating Asynchronous Tasks with ValueTask 6. IValueTaskSource and Custom Wrapping of ValueTask About IValueTaskSo…

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

1,可用版本与参考资料 2,ValueTask<TResult> 和 Task 3,编译器如何编译 4,ValueTask 有什么优势 5,ValueTask 创建异步任务 6,IValueTaskSource 和自定义包装 ValueTask 关于 IValueTaskSource 什么是 IValueTaskSource 再说 ValueTask 优势 不要自己全部实现 IValueTaskSource ValueTaskSourceOnCompletedFlags ValueTaskSourceS…

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

Distinguishing Debug and Release Environments It is well known that Debug is the compilation constant that is automatically available when developing in VS, while the code released uses Release. To create different compilation conditions in Debug and Release e…

2020年11月23日 3条评论 1274点热度 1人点赞 痴者工良 阅读全文

区分 调试和发布环境 众所周知,Debug 是在开发、在 VS 中时,自动会有的编译常量,而代码发布后则是 Release。 为了在 Debug、Release 环境下出现不同的编译条件。 .NET Core 项目添加条件编译变量,可在 .csproj 中加上 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DefineConstants>AAAA</DefineConstants&…

2020年11月23日 3条评论 8336点热度 1人点赞 痴者工良 阅读全文

Parallelism through simple threads Every year, parallelism and concurrency become more important as processors tend to have more and more physical cores. In most languages, writing parallel code is tricky. Very tricky. Not so in Rust, as it has been designed a…

2020年11月23日 0条评论 1152点热度 0人点赞 痴者工良 阅读全文

Parallelism through simple threads Every year, parallelism and concurrency become more important as processors tend to have more and more physical cores. In most languages, writing parallel code is tricky. Very tricky. Not so in Rust, as it has been designed a…

2020年11月23日 0条评论 8358点热度 0人点赞 痴者工良 阅读全文

Using the builder pattern Sometimes you need something between the customization of the constructor and the implicitness of the default implementation. Enter the builder pattern, another technique frequently used by the Rust standard library, as it allows a ca…

2020年11月23日 0条评论 1124点热度 0人点赞 痴者工良 阅读全文

Using the builder pattern Sometimes you need something between the customization of the constructor and the implicitness of the default implementation. Enter the builder pattern, another technique frequently used by the Rust standard library, as it allows a ca…

2020年11月23日 0条评论 3964点热度 0人点赞 痴者工良 阅读全文

Using the constructor pattern You may have asked yourself how to idiomatically initialize complex structs in Rust, considering it doesn't have constructors. The answer is simple, there is a constructor, it's just a convention rather than a rule. Rust's standar…

2020年11月23日 0条评论 1072点热度 0人点赞 痴者工良 阅读全文

Using the constructor pattern You may have asked yourself how to idiomatically initialize complex structs in Rust, considering it doesn't have constructors. The answer is simple, there is a constructor, it's just a convention rather than a rule. Rust's standar…

2020年11月23日 0条评论 4367点热度 0人点赞 痴者工良 阅读全文

Providing a default implementation Often, when dealing with structures that represent configurations, you don't care about certain values and just want to silently assign them a standard value. Usually, when processing structures that represent configurations,…

2020年11月23日 0条评论 1318点热度 0人点赞 痴者工良 阅读全文
1262728293054