21 热度

C# 中 ConfigureAwait 相关答疑FAQ

在前段时间经常看到园子里有一些文章讨论到 ConfigureAwait,刚好今天在微软官方博客看到了 Stephen Toub前不久的一篇答疑 ConfigureAwait 的一篇文章,想翻译过来。原文地址:https://devblogs.microsoft.com/dotnet/configureawait-faq/.NET 加入 async/await 特性已经有 7 年了。这段时间,它蔓延的非常快,广泛;不只在 .NET 生态系统,也出现在其他语言和框架中。在 .NET 中,他见证了许多了改进,利用异步在其他语言结构(additio...

收录时间: 2020-01-19
分类: C#开发
贡献者: Rector
20 热度

My First Xamarin app

A few days ago, my daughter was in a real funk. It breaks my heart to see her struggle. Fortunately, I knew exactly what to do, “build a mobile app!”Before the humorless among you think I’m a callous parent, that’s not exactly what I did of course. I gave her money.I kid. What I really did was liste...

收录时间: 2020-01-18
分类: Xamarin
贡献者: Rector
21 热度

C# Futures: Simplified Parameter Null Validation

At first glance, proposal #2145 seems like a logical extension to C# 8’s Nullable Reference Types feature. The basic idea is developers would no longer need to explicitly add argument null checks to methods that accept non-nullable parameters. However, this has become quite contentious.

收录时间: 2020-01-18
分类: C#开发
贡献者: Rector
19 热度

Blazor Mobile, Uno Platform, and WebAssembly

On Tuesday, the ever-impressive Blazor team announced a new experimental project: Mobile Bindings that allow developers to write Blazor-style syntax that produces Xamarin.Forms UI controls instead of HTML elements, therefore producing native iOS and Android applications.

收录时间: 2020-01-18
分类: Blazor
贡献者: Rector
20 热度

Don't Do It All Yourself: Exploiting gRPC Well Known Types in .NET Core

In an earlier column, I described how to define the message formats that clients can use to communicate with your gRPC services. I followed that up with another column that showed how you can re-use and import definitions. I mention those columns because in both of them I whined about how the Protocol Buffer (ProtoBuf) specification doesn't include some data types that I take for granted: date and decimal, to be precise (out of the box, ProtoBuf expects you to use the imprecise float type for data with decimals).

收录时间: 2020-01-18
分类: .NET Core
贡献者: Rector
30 热度

.net Core 使用IHttpClientFactory请求

导读:本文已添加在晨曦微服务之旅,现在自己在尝试微服务架构,一边学边做项目快速的进入状态。当然在学习的过程中会将自己学到的知识进行分享。 一、为什么不用HttpClient 1.HttPClient使用完之后不会立即关闭开启网络连接时会占用底层socket资源,但在HttpClient调用其本身的D ...

收录时间: 2020-01-17
分类: .NET Core
贡献者: Rector
AD 友情赞助
60 热度

.NET Core 2020 年 1 月更新,2.1.15、3.0.2 和 3.1.1

.NET Core 2020 年 1 月更新已发布,覆盖2.1.15、3.0.2 和 3.1.1。 这些更新包含安全性和可靠性修复程序。有关更新程序包的详细信息,请参见各个发行说明。 .NET Core 3.1.1和.NET Core SDK...

收录时间: 2020-01-17
分类: .NET Core
贡献者: Rector
40 热度

CSS4 is here!

I think that CSS would be greatly helped if we solemnly state that “CSS4 is here!” In this post I’ll try to convince you of my viewpoint. I am proposing that we web developers, supported by the W3C CSS WG, start saying “CSS4 is here!” and excitedly chatter about how it will hit the market any moment now and transform the practice of CSS.

收录时间: 2020-01-17
分类: CSS
贡献者: Rector
45 热度

Using gRPC-Web with Blazor WebAssembly

If you already know all about gRPC and gRPC-Web, you can skip ahead to adding gRPC services to a Blazor WebAssembly application. And if you just want some sample Blazor WebAssembly + gRPC-Web apps, see this repo.The status quoIn Blazor WebAssembly, like in all other browser-based single-page app (SP...

收录时间: 2020-01-17
分类: Blazor
贡献者: Rector
37 热度

UTF-8 BOM adventures in C#

Time for a quick look at UTF-8 encoding and byte order marker (BOM). Lets jump right into some code. You are probably going to nail this as you most likely will be alert now, given the title and all, but would you have expected this test to pass?

收录时间: 2020-01-17
分类: C#开发
贡献者: Rector
34 热度

Refreshing your Legacy ASP.NET IdentityServer Client Applications (with PKCE)

If you have an ASP.NET MVC application in production that uses IdentityServer, you may soon find yourself in its codebase due to the upcoming SameSite cookie changesspearheaded by Google.While you’re in there messing with the code, why don’t you give your old application a freshen up and update your...

收录时间: 2020-01-17
分类: ASP.NET
贡献者: Rector
61 热度

EntityFramework Core表名原理解析,让我来,揭开你神秘的面纱

上一节我们针对最开始抛出的异常只是进行了浅尝辄止的解析,是不是有点意犹未尽的感觉,是的,我也有这种感觉,看到这里相信您和我会有一些疑惑,要是我们接下来通过注解、Fluent APi、DbSet分别对表名进行如下设置,是否会抛出异常呢?若不是,有其优先级,那么其优先级到底是怎样的呢?内置具体是如何实现的呢?让我们从头开始揭开其神秘的面纱。EntityFramework Core表名原理解析我们暂不知道到底是否有其优先级还是会抛出异常,那么接下来我们进行如下配置(模型请参考上一节《https://www.cnblogs.com/CreateMyself/p/12175618.html》)进行原...

收录时间: 2020-01-16
贡献者: Rector
48 热度

.NET Core 3 WPF MVVM框架 Prism系列之事件聚合器

本文将介绍如何在.NET Core3环境下使用MVVM框架Prism的使用事件聚合器实现模块间的通信一.事件聚合器在上一篇 .NET Core 3 WPF MVVM框架 Prism系列之模块化我们留下了一些问题,就是如何处理同模块不同窗体之间的通信和不同模块之间不同窗体的通信,Prism提供了一种事件机制,可以在应用程序中低耦合的模块之间进行通信,该机制基于事件聚合器服务,允许发布者和订阅者之间通过事件进行通讯,且彼此之间没有之间引用,这就实现了模块之间低耦合的通信方式,下面引用官方的一个事件聚合器模型图:二.创建和发布事件1.创建事件首先我们来处理同模块不同窗体之间的通讯,我们在PrismM...

收录时间: 2020-01-16
分类: .NET Core
贡献者: Rector
64 热度

Windows Terminal Preview v0.8 发布

Windows Terminal Preview v0.8 已经发布,该版本内容如下: Search 终端添加了搜索功能,调用搜索下拉列表的默认键绑定是 {"command": "find", "keys": ["ctrl+shift+f"]}。你也可以在 prof...

收录时间: 2020-01-16
分类: 技术资讯
贡献者: Rector
60 热度

Atom 1.43.0 发布,改进各种语法高亮

Atom 1.43.0 发布了。Atom 是 GitHub 专门为程序员推出的一个跨平台文本编辑器。具有简洁和直观的图形用户界面,并有很多有趣的特点:支持 CSS、HTML 与 JavaScript 等网页编程语言,支持宏、...

收录时间: 2020-01-16
分类: 开发工具
贡献者: Rector
AD 友情赞助
72 热度

Collecting and analyzing memory dumps

Building upon the diagnostics improvements introduced in .NET Core 3.1, we’ve introduced a new tool for collecting heap dumps from a running .NET Core process. In a previous blog post we introduced, dotnet-dump, a tool to allow you to capture and analyze process dumps. Since then, we’ve been hard at work to improve the experience when working with dumps.

收录时间: 2020-01-16
分类: .NET Core
贡献者: Rector
49 热度

ASP.NET Core IIS InProcess Hosting Issue in .NET Core 3.1

I ran into a nasty issue yesterday related to hosting an ASP.NET Core 3.1 server application in IIS using the default InProcess hosting. If you're not familiar with ASP.NET Core hosting in IIS, here is a previous post that provides more insight on the two hosting modes, how they work and how they di...

收录时间: 2020-01-16
分类: ASP.NET Core
贡献者: Rector
69 热度

Asp.Net Core下的开源任务调度平台ScheduleMaster—快速上手

概述ScheduleMaster是一个开源的分布式任务调度系统,它基于Asp.Net Core平台构建,支持跨平台多节点部署运行。它的项目主页在这里:https://github.com/hey-hoho/ScheduleMasterCore关于它的简单介绍可以看这里:https://www.cnblogs.com/hohoa/p/12162581.html本地部署使用前请准备好所需环境...

收录时间: 2020-01-15
分类: ASP.NET Core
贡献者: Rector
78 热度

.NET Core学习笔记(3)——async/await中的Exception处理

在写了很多年.NET程序之后,年长的猿类在面对异步编程时,仍不时会犯下致命错误,乃至被拖出去杀了祭天。本篇就async/await中的Exception处理进行讨论,为种族的繁衍生息做出贡献……处理async/await中的Exception,最致命的莫过于想抓的Exception抓不到,程序崩的莫名其妙,连日志都没记下来,没法定位错误...

收录时间: 2020-01-15
分类: .NET Core
贡献者: Rector
79 热度

避免在ASP.NET Core 3.0中为启动类注入服务

本篇是如何升级到ASP.NET Core 3.0系列文章的第二篇。Part 1 - 将.NET Standard 2.0类库转换为.NET Core 3.0类库Part 2 - IHostingEnvironment VS IHostEnvironent - .NET Core 3.0中的废弃类型Part 3 - 避免在ASP.NET Core 3.0中为启动类注入服务(本篇)...

收录时间: 2020-01-15
分类: ASP.NET Core
贡献者: Rector
AD 友情赞助