51 热度

Introducing Package Source Mapping

We’re happy to announce the first preview release of Package Source Mapping with Visual Studio 2022 preview 4! Package Source Mapping gives you fine-grained control of where your packages come from by mapping every package in your solution to a target package source. Safeguarding your software supply chain is crucial if you use a mix of public and private package sources. Earlier this year, we published a set of best security practices to minimize risk from vulnerable packages and supply chain compromises like dependency confusion. Package Source Mapping is another powerful feature to help you fortify your supply chain against attacks. Use Source Mapping to centrally declare which source each package in your solution should restore from in your nuget.config file.

收录时间: 2021-09-18
分类: .NET
贡献者: Rector
49 热度

Using .NET To Validate JSON with JSON Schema

JSON is arguably one of the most used data formats on the planet, likely due to its flexibility and human readability. We can also recognize that its two greatest strengths can also be the format’s weakness. Being human-readable gives developers the confidence to make manual changes, likely making errors along the way. The flexibility of parsers tends to let these structural errors exist in production settings longer than they should. Luckily for .NET developers, we have mechanisms to programmatically check the validity of JSON to ensure some level of correctness. We’ll see how to read JSON and check it against its schema definition.

收录时间: 2021-09-15
分类: .NET
贡献者: Rector
63 热度

AgileConfig轻量级配置中心1.4.0发布,重构了发布功能

先说一个事,AgileConfig在 7 月底终于通过了 NCC社区的审核,正式成为了 NCC 大家庭的一员。这对 AgileConfig 来说是一个里程碑,希望加入 NCC 后能更好的帮助到大家。同时责任也更大了,本人会一如既往的对这个项目维护下去,感谢支持。release-1.4.0本次1.4.0发布版本是一个比较大更新。解决了 AgileConfig 一些长期存在的功能上的问题。之前版本的发布、回滚只针对单独某个配置,当对某个配置编辑后会记录修改历史,并且发布后的配置修改是实时生效的。这会带来2个比较大的问题:没有办法追踪“删除”的配置因为修改历史记录针对的是单个配置,但是当...

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

Introduction to System.Text.Json Through Examples

In this article, we are going to learn about the System.Text.Json library that helps us efficiently and easily handle JSON in our applications.To download the source code for this article, you can visit our System.Text.Json repository.The article is divided into the following sections...

收录时间: 2021-09-14
分类: .NET
贡献者: Rector
70 热度

Writing Logs to SQL Server Using NLog

We have previously learned how to log messages to a File using NLog. In this article, we are going to learn how to use Nlog to log messages into SQL Server. We are going to see how we can configure an ASP.NET Core Web API project to support NLog and how we can configure NLog using an XML configuration file.

收录时间: 2021-09-09
分类: .NET
贡献者: Rector
88 热度

Building micro services through Event Driven Architecture part15 : SPA Front End

Building microservices through Event Driven Architecture part15 : SPA Front End. This tutorial is the 15th part of a series : Building microservices through Event Driven Architecture. The previous step is about Building micro services through Event Driven Architecture part14 : Query API In this tutorial, I will show how to build a SPA Front End using angular to send commands and request queries. The SPA Front End use the commandAPI to send commands ( create , update or delete a speech), then the command will transit to a Kafka service bus before being available to a no-sql database elasticsearch. The Query API will use the no-sql database elasticsearch to display the newly created data ( In the the upcomming tutorial, I will use Signalr Notification to notify the SPA Front End to update the screen ) To follow this tutorial, you should be familiar with angular

收录时间: 2021-08-31
分类: .NET
贡献者: Rector
AD 友情赞助
121 热度

The Catch Block #71 - Conflict, Lambdas, Updating Tests, and Defaults

In this edition: keeping your tests updated; software as a product; getting property names from lambda expressions; resolving conflict in remote teams; real-world refactoring; and default browser problems in Windows 11.

收录时间: 2021-08-26
分类: .NET
贡献者: Rector
117 热度

ValueStringBuilder: a stack-based string-builder: A deep dive on StringBuilder - Part 6

This series has focused on the common StringBuilder type and how it works internally to efficiently build strings. In my previous post I looked at the internal StringBuilderCache object that's used by .NET Framework and .NET Core to further reduce the allocations associated with building strings. In this post I look at another internal class that goes even further: ValueStringBuilder. Before we look at the type, I'll do a quick recap on the different types of memory allocation possible in .NET

收录时间: 2021-08-18
分类: .NET
贡献者: Rector
121 热度

Playing with System.Text.Json Source Generators

In my daily work, I’m becoming quite familiar with the ins and outs of using System.Text.Json. For those unfamiliar with this library, it was released along with .NET Core 3.0 as an in-the-box JSON serialisation library. At its release, System.Text.Json was pretty basic in its feature set, designed primarily for ASP.NET Core scenarios to handle input and output formatting to and from JSON. The library was designed to be performant and reduce allocations for common scenarios. Migrating to System.Text.Json helped ASP.NET Core continue to improve the performance of the framework.

收录时间: 2021-08-17
分类: .NET
贡献者: Rector
93 热度

Unit & Integration Testing In .Net With Moq and xUnit

Today I want to cover some simple testing setup and configuration. I'll be using my example project from the Dapper & CQRS post I made last week so consider this post a part 2. For tooling I'll be using xUnit and Moq as well as a few other nuget packages to easily configure and run tests in Visual Studio. I am working on a Mac, but operating system shouldn't matter.

收录时间: 2021-08-16
分类: .NET
贡献者: Rector
96 热度

dotnet 使用 XWT 构建跨平台客户端 入门篇

本文告诉大家如何入门开始开发一个基于 mono 组织开源的 XWT 跨平台客户端 UI 框架的应用,本文的 xwt 是在 GitHub 上完全开源的,基于 MIT 协议的,底层采用 GTK# 的 UI 框架本文告诉大家如何入门开始开发一个基于 mono 组织开源的 XWT 跨平台客户端 UI 框架的应用,本文的 xwt 是在 GitHub 上完全开源的,基于 MIT 协议的,底层采用 GTK# 的 UI 框架此 xwt 在设计上是通过 mono 进行跨平台运行的,而非采用 dotnet core 方式进行跨平台运行的,因此暂时只能使用 dotnet framework 4.7.2 版本,而不支...

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

Dealing with access tokens in dotnet

When working with http APIs you'll sooner or later run into access tokens. I will not go into any depth of the whys and the hows but let's do a quick breakdown. Let's have a look at how we can work with access tokens in a smart way using dotnet.

收录时间: 2021-08-09
分类: .NET
贡献者: Rector
71 热度

How Does the StringBuilder Work in .NET? (Part 1)

In this post, I want to begin a series of posts that I hope will be useful to developers looking to understand why this advice exists and how the StringBuilder is implemented to support more efficient string manipulation. Today, we will focus on understanding the problem that the StringBuilder class is designed to solve and when it makes sense to use it in our code.

收录时间: 2021-08-09
分类: .NET
贡献者: Rector
150 热度

Developing a realtime full stack app with .NET, Angular, and MongoDB

In today's tutorial we are going to create a simple retrospective app. It will save information about the discussed topics and show them to users in real time so they can easily see the previous, current, and future topics during the current meeting. The code is written in .NET 5. It’s divided into several services, every one of them responsible for a single context.

收录时间: 2021-08-05
分类: .NET
贡献者: Rector
166 热度

Microsoft Will Replace Xamarin Forms With MAUI .NET

Microsoft has updated Xamarin.Essentials and has revealed its plans for Xamarin.Forms once .NET MAUI Essentials arrives this fall. Alongside more details of MAUI, Microsoft says it will end updates to the Xamarin mobile app development platform in November 2022. Xamarin has been the Microsoft technology for developers to use if they want to develop apps for iOS and Android using C#. It is based on Mono, the open source implementation of Microsoft's .NET Framework. NET MAUI, the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

收录时间: 2021-08-03
分类: .NET
贡献者: Rector
AD 友情赞助
124 热度

Conversation about the .NET open source project

Open source was an attractive and exciting idea when we first considered sharing .NET Core on GitHub. At the same time, GitHub was a largely unknown platform for many of us and we had a lot of questions about how everything would work. “What if someone forks the runtime on the first day? Is the project over?”. We knew enough that we should take the time to learn the patterns that developers had already established and also what they expected of us. That said, we also had to host a project and org from day one, and it got busy much quicker than we expected. We’re several years and versions in at this point, and the rest is now history. It’s been a fun journey that we’ll reflect on with folks that have been part of it in a variety of ways.

收录时间: 2021-07-29
分类: .NET
贡献者: Rector
137 热度

How Does the StringBuilder Work in .NET? (Part 3)

So far in this series, we’ve learned when we should consider using StringBuilder in our code and learned about the memory overhead of using a StringBuilder. It’s now time to learn how the StringBuilder can “expand” its capacity and support appending string data efficiently. As with the last post, this content is based upon a review of the implementation details of the StringBuilder class and these details may change over time. I have used the current code from .NET 6 while researching this blog post. The design of StringBuilder has changed little in past versions of .NET, so I expect these to remain broadly applicable to earlier .NET versions.

收录时间: 2021-07-29
分类: .NET
贡献者: Rector
175 热度

传统.NET 4.x应用容器化体验(5)

前面几篇都是基于阿里云ECS直接玩的,有童鞋问直接用Windows Server 2019可以玩不,本篇就为你介绍一下如何给Windows Server 2019配置Docker环境。本文介绍了如何在本地的Windows Server 2019服务器上安装和配置Docker环境,最后演示了一下ASP.NET应用的基本容器操作。前面几篇都是基于阿里云ECS直接玩的,有童鞋问直接用Windows Server 2019可以玩不,本篇就为你介绍一下如何给Windows Server 2019配置Docker环境。1 准备工作首先,你需要一台服务器,安装 Windows Server 2019 Dat...

收录时间: 2021-07-28
分类: .NET
贡献者: Rector
129 热度

Try the new System.Text.Json source generator

In .NET 6.0, we are shipping a new C# source generator to help improve the performance of applications that use System.Text.Json. In this post, I’ll go over why we built it, how it works, and what benefits you can experience in your application.

收录时间: 2021-07-27
分类: .NET
贡献者: Rector
127 热度

MvvmCross 8.0.2

A new MvvmCross version is available on NuGet! You can always find the latest changelog in the root of the repository to see what has changed between versions. This is a minor release with some bug fixes to MvvmCross. In addition we have a new non-breaking feature, which adds sticky messages to the Messaging plugin. Most pressing issue is the registration of IMvxTextProvider which didn’t work and resulted in issues resolving it.

收录时间: 2021-07-27
分类: .NET
贡献者: Rector
AD 友情赞助