10 热度

AOP框架Dora.Interception 3.0 [2]: 实现原理

和所有的AOP框架一样,我们必须将正常的方法调用进行拦截,才能将应用到当前方法上的所有拦截器纳入当前调用链。Dora.Interception采用IL Eimit的方式实现对方法调用的拦截,接下来我们就来聊聊大致的实现原理。一、与依赖注入框架的无缝集成由于Dora.Interception是为.NET Core定制的AOP框架,而依赖注入是.NET Core基本的编程方式,所以Dora.Interception最初就是作为一个依赖注入框架的扩展而涉及的。我们知道.NET Core的依赖注入框架支持三种服务实例提供方式。由于Dora.Interception最终会利用IL Emit的方式动态生成...

收录时间: 2019-10-22
分类: .NET
贡献者: Rector
13 热度

.NET Framework October 2019 Preview of Quality Rollup

Today, we are releasing the October 2019 Preview of Quality Rollup and Cumulative Updates for .NET Framework....

收录时间: 2019-10-17
分类: .NET
贡献者: Rector
14 热度

.NET Framework 4.x 程序到底运行在哪个 CLR 版本之上

当我们编译程序目标框架选为 .NET Framework 4.5/4.6/4.7/4.8 时,CLR 运行时是如何判断我们究竟应该用哪一个 .NET Framework 呢?.NET Framework 的版本到底由哪些部分组成?我们编译 .NET Framework 时选择的版本决定了什么?

收录时间: 2019-10-17
分类: .NET
贡献者: Rector
9 热度

Handling type hierarchies in Cosmos DB (part 1)

Azure Cosmos DB is Microsoft’s NoSQL cloud database. In Cosmos DB, you store JSON documents in containers. This makes it very easy to model data, because you don’t need to split complex objects into multiple tables and use joins like in relational databases. You just serialize your full C# object graph to JSON and save it to the database. The Cosmos DB .NET SDK takes care of serializing your objects...

收录时间: 2019-10-15
分类: .NET
贡献者: Rector
11 热度

No Exception Left Unlogged

Last week I was tasked with tracking down a perplexing problem with an API - every call was returning a 500 error, but there was nothing in the logs that gave us any clue why. The problem was not reproducible locally, and with firewall restrictions getting in the way of remote debugging, it took me a while to find the root cause.

收录时间: 2019-10-15
分类: .NET
贡献者: Rector
46 热度

Log4net Tutorial for .NET Logging: 14 Best Practices and Examples

If you’re a .NET developer, then you’ve probably used some of the many famous logging frameworks available for use at this platform. Today’s post will cover one of these frameworks: log4net.

收录时间: 2019-10-11
分类: .NET
贡献者: Rector
AD 友情赞助
30 热度

.NET Framework October 2019 Security and Quality Rollup

Today, we are releasing the October 2019 Security and Quality Rollup and Cumulative Updates for .NET Framework...

收录时间: 2019-10-09
分类: .NET
贡献者: Rector
35 热度

AOP框架Dora.Interception 3.0 [1]: 编程体验

.NET Core正式发布之后,我为.NET Core度身定制的AOP框架Dora.Interception也升级到3.0。这个版本除了升级底层类库(.NET Standard 2.1)之外,我还对它进行大范围的重构甚至重新设计。这次重构大部分是在做减法,其目的在于使设计和使用更加简单和灵活,接下来我们就来体验一下在一个ASP.NET Core应用程序下如何使用Dora.Interception。源代码下载实例1(Console)实例2(ASP.NET Core MVC + 注册可拦截服务)实例3(ASP.NET Core MVC + 注册InterceptableServiceProvide...

收录时间: 2019-10-08
分类: .NET
贡献者: Rector
32 热度

.Net 5.0 : The future of .Net

In my previous post I added links to get the archived presentations and sessions for .Net Conf 2019 which you can find here.In this quick post we will see what is long term .Net release schedule and what is the near future of .Net.

收录时间: 2019-10-08
分类: .NET
贡献者: Rector
50 热度

深入Dapper.NET源码 (文长)

前言、目录、安装环境经过业界前辈、StackOverflow多年推广,「Dapper搭配Entity Framework」成为一种功能强大的组合,它满足「安全、方便、高效、好维护」需求。但目前中文网路文章,虽然有很多关于Dapper的文章但都停留在如何使用,没人系统性解说底层原理。所以有了此篇「深入Dapper源码」想带大家进入Dapper底层,了解Dapper的精美细节设计、高效原理,并学起来实际应用在工作当中。建立Dapper Debug环境到Dapper Github 首页Clone最新版本到自己本机端建立.NET Core Console专案需要安装NuGet SqlClient套...

收录时间: 2019-10-07
分类: .NET
贡献者: Rector
53 热度

.NET Framework September 2019 Preview of Quality Rollup

We have released the September 2019 Preview of Quality Rollup and Cumulative Updates for .NET Framework for Windows 10

收录时间: 2019-09-27
分类: .NET
贡献者: Rector
48 热度

dotnet new - Behind the Scenes

One of my favourite things about .NET Core is the dotnet command line tool. With dotnet new, you can quickly scaffold a new project of various types. For example dotnet new webapp creates an ASP.NET Core web app. And if you simply type dotnet new you can see a list of all of the available templates...

收录时间: 2019-09-26
分类: .NET
贡献者: Rector
58 热度

Announcing free C#, .NET, and ASP.NET for beginners video courses and tutorials

If you've been thinking about learning C#, now is the time to jump in! I've been working on this project for months and I'm happy to announce http://dot.net/videos  There's nearly a hundred short videos (with more to come!) that will teach you topics like C# 101, .NET, making desktop apps, making AS...

收录时间: 2019-09-25
分类: .NET
贡献者: Rector
39 热度

Unit testing wai applications

I'm currently developing a REST API in Haskell using Servant, and I'd like to test the HTTP API as well as the functions that I use to compose it. The Servant documentation, as well as the servant Stack template, uses hspec to drive the tests.

收录时间: 2019-09-24
分类: .NET
贡献者: Rector
43 热度

Rx.NET in the real world

Because of the decisions the C# team made while designing LINQ, Rx.Net is a one of a kind flavor of Reactive Extensions. The names of all basic operators are made so that they match their LINQ counterparts instead of the RX conventions. This can lead to some confusion, especially if your team learned RX using some other languages.

收录时间: 2019-09-24
分类: .NET
贡献者: Rector
AD 友情赞助
48 热度

.NET分布式大规模计算利器-Orleans(一)

Orleans是基于Actor模型思想的.NET领域的框架,它提供了一种直接而简单的方法来构建分布式大规模计算应用程序,而无需学习和应用复杂的并发或其他扩展模式。我在2015年下半年开始应用Orleans,当时公司的交易系统采用的架构就是基于Orleans框架的,其展现出来的高性能、高并发以及惊人的稳定性深深地吸引了我,也让我认识到了传统三层无状态架构的缺陷。本文主要关注Orleans的思想基础,Actor模型及其应用。

收录时间: 2019-09-23
分类: .NET
贡献者: Rector
44 热度

Using Roslyn to build object to object mapper

Back in time I wrote series of posts about how I built simple object to object mapper. It was nine years ago and from them more things have changed. Today I added one new implementation of mapper and this one is using Roslyn compiler services to generate dynamic code for mappings.

收录时间: 2019-09-19
分类: .NET
贡献者: Rector
50 热度

Emulating a PlayStation 1 (PSX) entirely with C# and .NET

I was reading an older post in an emulator forum where someone was asking for a Playstation 1 (PSX) emulator written in C#, and the replies went on and on about how C# and .NET are not suited for emulation, C# is far too slow, negativity, blah blah. Of course, that's silly. Good C# can run at near-n...

收录时间: 2019-09-17
分类: .NET
贡献者: Rector
77 热度

.NET Framework September 2019 Security and Quality Rollup

Today, we are releasing the September 2019 Cumulative Update, Security and Quality Rollup, and Security Only Update for .NET Framework.

收录时间: 2019-09-11
分类: .NET
贡献者: Rector
57 热度

Unit testing Autofac registrations

We use Autofac as our IoC container at Konstrukt, so we can easily mock dependencies when unit testing, allow for more flexibility and general decoupling. All the normal stuff you would expect with IoC and dependency injection. Fore the most part, I’ve been very pleased with Autofac, and I’m a big fan of Dependency Injection and Inversion of Control. But, in a test-driven environment, where we mock out the dependencies further down the tree, we often get scenarios where we forget to register the types and interfaces in our modules (and container), only to be surprised by runtime errors and exceptions. Registering all classes with matching interfaces in dependent assemblies in an automated manner is not an option, as the interfaces aren’t always header interfaces, and we don’t want to add more registrations than we need, and a few other reasons.

收录时间: 2019-09-11
分类: .NET
贡献者: Rector
AD 友情赞助