Kerwen Blog

Stay Hungry Stay Foolish

Subject vs BehaviorSubject vs ReplaySubject

Subject A Subject is a special type of Observable that allows values to be multicasted to many Observers. Subjects are like EventEmitters. 使用Subject时,订阅者只会获得订阅后发出的发布值。 Subject有三个子类: 1 2 3 Beha...

DelegatingHandler

什么是DelegateHandler ASP.NET Web API的核心框架是一个消息处理管道,这个管道是一组HttpMessageHandler的有序组合。这是一个双工管道,请求消息从一端流入并依次经过所有HttpMessageHandler的处理。在另一端,目标HttpController被激活,Action方法被执行,响应消息随之被生成。响应消息逆向流入此管道,同样会经过逐个Http...

OWIN

OWIN是Open Web Server Interface for .NET的首字母缩写. OWIN在.NET Web Servers与Web Application之间定义了一套标准接口,OWIN的目标是用于解耦Web Server和Web Application。基于此标准,鼓励开发者开发简单、灵活的模块,从而推进.NET Web Development开源生态系统的发展。 为什么需...

Signal R

ASP.NET Core SignalR 是一个开放源代码库,可用于简化向应用添加实时 Web 功能。 实时 Web 功能使服务器端代码能够将内容推送到客户端。 SignalR 支持以下用于处理实时通信的技术(按正常回退的顺序): WebSockets Server-Sent Events 长轮询 SignalR 自动选择服务器和客户端能力范围内的最佳传输方法。 Server 创...

IEnumerable IActionResult ActionResult

在 ASP.NET Core 中有三种返回 数据 和 HTTP状态码 的方式 IEnumerable IEnumerable只能返回数据,附带不了http状态码 1 2 3 4 5 [HttpGet] public IEnumerable<Author> Get() { return authors; } 在 ASP.NET Core 3.0 开始,你不仅可以定义同...

Wix Heat自动link文件夹下的所有内容

Harvest a directory 1 heat dir ".\My Files" -gg -sfrag -template:fragment -out directory.wxs Harvest Tool (Heat)

Basic, Digest and JWT Authentication

Authentication is knowing the identity of the user. For example, Alice logs in with her username and password, and the server uses the password to authenticate Alice. Authorization is deciding whet...

Angular Resolver

Angular-Resolve 理解Angular中的Resolver

AddTransient AddScoped AddSingleton

Transient objects are always different; a new instance is provided to every controller and every service. Scoped objects are the same within a request, but different across different requests. Si...

Angular本地化

Angular本地化有两种方式,一种是Angular官网推荐的i18n标记,另外一种是ngx-translate Angular Angular/localize 要利用 Angular 的本地化功能,请用 Angular CLI 将 @angular/localize 包添加到你的项目中。 1 ng add @angular/localize Angular 提供了以下内置的数据转...