1519 热度

.Net全网最简RabbitMQ操作【强烈推荐】

本文自1年前的1.0版本推出以来,已被业界大量科技公司采用。同时也得到了.Net圈内多位大佬的关注+推荐,文章也被多家顶级.Net/C#公众号转载。现在更新到了7.0版本,更好的服务各位.Neter。 【正文】支持.Net/.Net Core/.Net Framework,可以部署在Docker, Windows, Linux, Mac。RabbitMQ作为一款主流的消息队列工具早已广受欢迎。相比于其它的MQ工具,RabbitMQ支持的语言更多、功能更完善。 本文提供一种市面上最/极简单的使用RabbitMQ的方式,只需要会调用以下三个方法,你就几乎可以掌握整个RabbitMQ的使用:...

收录时间: 2023-06-09
分类: .NET
贡献者: Rector
1740 热度

URI Encode and Decode in .NET

In this article, we are going to learn about URI encode and decode and how we can achieve this using .NET. Only certain characters are valid in a URL. We therefore sometimes need to perform a URI encode and decode on some characters, before we transmit them over the internet and we call this process URI Encoding. We can classify characters in a URL as either reserved or unreserved. The reserved characters are those characters that have a special meaning and generally mark the various parts of a URL. For example, the ‘?‘ character in a URL indicates the start of any query parameters.

收录时间: 2023-05-17
分类: .NET
贡献者: Rector
1422 热度

从 Newtonsoft.Json 迁移到 System.Text.Json

System.Text.Json 是 .NET Core 3 及以上版本内置的 Json 序列化组件,刚推出的时候经常看到踩各种坑的吐槽,现在经过几个版本的迭代优化,提升了易用性,修复了各种问题,是时候考虑使用 System.Text.Json 了。本文将从使用层面来进行对比。 System.Text.Json 在默认情况下十分严格,避免进行任何猜测或解释,强调确定性行为。比如:字符串默认转义,默认不允许尾随逗号,默认不允许带引号的数字等,不允许单引号或者不带引号的属性名称和字符串值。 该库是为了实现性能和安全性而特意这样设计的。Newtonsoft.Json 默认情况下十分灵活。 关于性能,参考 Incerry 的性能测试:.NET性能系列文章二:Newtonsoft.Json vs. System.Text.Json ,如果打算使用 .NET 7 不妨考虑一下 System.Text.Json。

收录时间: 2023-02-16
分类: .NET
贡献者: Rector
1146 热度

What is .NET, and why should you choose it?

.NET has changed a lot since we kicked off the fast-moving .NET open-source and cross-platform project. We’ve re-thought and refined the platform, adding new low-level capabilities designed for performance and safety, paired with higher-level productivity-focused features. Span, hardware intrinsics, and nullable reference types are examples. We’re kicking off a new “.NET Design Point” blog series to explore the fundamentals and design choices that define today’s .NET platform, and how they benefit the code you are writing now.

收录时间: 2023-02-16
分类: .NET
贡献者: Rector
1309 热度

.NET February 2023 Updates – .NET 7.0.3, .NET 6.0.14

Today, we are releasing the .NET February 2023 Updates. These updates contain security and non-security improvements. Your app may be vulnerableif you have not deployed a recent .NET update.You can download 7.0.3and 6.0.14versions for Windows, macOS, and Linux, for x86, x64, Arm32, and Arm64...

收录时间: 2023-02-16
分类: .NET
贡献者: Rector
1751 热度

Rebus in .NET - Service Bus Implementation

When working with distributed applications that need to asynchronously communicate with each other, the “Publish-Subscribe” pattern is very common. To avoid being tightly coupled to a message broker, such as RabbitMQ, we use an abstraction layer, known as a service bus. Rebus is one such service bus implementation for .NET that allows us to easily communicate asynchronously between services. This article makes use of Docker to run our message broker (RabbitMQ) server locally.

收录时间: 2023-01-12
分类: .NET
贡献者: Rector
AD 友情赞助
1601 热度

How to Add a BearerToken to an HttpClient Request

Often, in our daily routine, we have to deal with secure APIs and use a BearerToken to make HTTP requests. In this article, we are going to learn the correct way to add a BearerToken to an HttpClient request.

收录时间: 2023-01-05
分类: .NET
贡献者: Rector
1020 热度

Working With Collections in .NET

When we develop software applications, we may need to create, store and manipulate groups of related objects. In this article, we will discuss the various ways in which we can perform such operations using different collections in .NET.

收录时间: 2022-12-15
分类: .NET
贡献者: Rector
1152 热度

.NET December 2022 Updates – .NET 7.0.1, .NET 6.0.12, .NET Core 3.1.32

Today, we are releasing the .NET December 2022 Updates. These updates contain security and non-security improvements. Your app may be vulnerable if you have not deployed a recent .NET update. You can download 7.0.1, 6.0.12, and 3.1.32 versions for Windows, macOS, and Linux, for x86, x64, Arm32, and Arm64.

收录时间: 2022-12-14
分类: .NET
贡献者: Rector
1140 热度

Schedule Jobs with Quartz.NET

Recurring, background tasks are widespread and very common when building applications. These tasks can be long-running or repetitive and we don’t want to run them in the foreground, as they could affect the user’s experience of the application. So instead we must schedule these jobs to run in the background somewhere. To achieve this in .NET, we can use the Quartz.NET library to manage the creation and scheduling of these jobs. This article makes use of Docker to run SQL Server server locally. Optionally a local install of SQL Server can be used.

收录时间: 2022-12-13
分类: .NET
贡献者: Rector
1289 热度

Producer-Consumer Applications With .NET Channels

When building applications, usually we need to create long-running background tasks, that can be sent to one or more background processes. This is known as a producer/consumer pattern. For these scenarios, we need something more robust than a first-in, first-out queue, but we don’t need the complexity and infrastructure involved in a message broker such as RabbitMQ, which is where Channels comes in.

收录时间: 2022-12-03
分类: .NET
贡献者: Rector
844 热度

What’s new in the .NET MAUI Community Toolkit

November has been a busy time for the .NET MAUI Community toolkit with multiple releases featuring a ton of amazing new features (not to mention a long list of bug fixes). The latest releases have new Views, Layouts, Tizen support, .NET 7 support and so much more. This post will get you up to speed on all the new features.

收录时间: 2022-12-03
分类: .NET
贡献者: Rector
1392 热度

Using Dynamic LINQ With System.Linq.Dynamic.Core Library

In most applications, we query data from a source, a database, for instance, and perform operations on that data. For this, we use can use LINQ. However, when we want to unlock more powerful features of the C# language, we use the System.Linq.Dynamic.Core library. In this article, we are going to learn about this library and its features through different use cases.

收录时间: 2022-11-21
分类: .NET
贡献者: Rector
791 热度

Stop using trivial Guard Clauses! Try this instead

Guard clauses, on the surface, sound like a great idea. They can reduce conditional complexity by exiting a method or function early. However, I find guard clauses used in the real world to be of little value. Often polluting application-level code for trivial preconditions. I will refactor some code to push those preconditions forcing the edge of your application so your domain focuses on real business concerns.

收录时间: 2022-11-21
分类: .NET
贡献者: Rector
1087 热度

Announcing NuGet 6.4 - Signed, Central, Delivered

NuGet 6.4 is included in Visual Studio 2022 and .NET 7.0 out of the box. You can also download NuGet 6.4 for Windows, macOS, and Linux as a standalone executable. NuGet 6.4 is one of many releases in our .NET unification journey. Our NuGet tooling helps developers discover new .NET packages to use for their .NET applications, while making package management easier during your daily development.

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

.NET November 2022 Updates – .NET 6.0.11 and .NET Core 3.1.31

Today, we are releasing the .NET November 2022 Updates. These updates contain non-security improvements. Your app may be vulnerable if you have not deployed a recent .NET update. You can download 6.0.11 versions for Windows, macOS, and Linux, for x86, x64, Arm32, and Arm64.

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

.NET Framework November 2022 Security and Quality Rollup Updates

Today, we are releasing the November 2022 Security and Quality Rollup Updates for .NET Framework.

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

Announcing .NET Community Toolkit v8.1.0 Preview 1

We’re happy to announce Preview 1 of the upcoming .NET Community Toolkit 8.1 release! This first official preview includes several highly requested new features, bug fixes, and most importantly it includes massive performance improvements to the MVVM Toolkit source generators, to make the developer UX when using them even in very large solutions, better than ever!

收录时间: 2022-11-07
分类: .NET
贡献者: Rector
1162 热度

.NET 7 Performance Improvements in .NET MAUI

When .NET MAUI reached GA, we had goals of improving upon Xamarin.Forms in startup time and application size. See last release’s Performance Improvements in .NET MAUI, to learn about the performance benefits of migrating from Xamarin.Android, Xamarin.iOS, or Xamarin.Forms to .NET 6+ and .NET MAUI.

收录时间: 2022-11-04
分类: .NET
贡献者: Rector
1007 热度

Using WASM and WASI to run .NET 7 on a Raspberry PI Zero 2 W

WebAssembly (WASM) and WebAssembly System Interface (WASI) are opening new opportunities for developers. .NET developers became familiar with WASM when Blazor WebAssembly was released. Blazor WebAssembly runs client-side in the browser on a WebAssembly-based .NET runtime. WASI is bringing WASM out of the browser world by providing a system interface to run WebAssembly outside the web. It is a standard for how WASM modules interact with the host environment. This post will show you how to run .NET 7 on a Raspberry PI Zero 2 W using WASM and WASI.

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