Digests » 253
C# is an amazing language that's up to any challenge you can throw at it. With 40% off your entire order, including books covering all aspects of C# development, written by experts and legends like Jon Skeet, you're sure to find what you need to become a better developer with Manning!
this week's favorite
Visual Studio 2019 is generally available today and available for download. With Visual Studio 2019, you and your teams will become more productive in building current and future projects as you benefit from the innovation in the IDE that makes every keystroke count.
Let’s consider a simple programming challenge: Summing all elements in a large array. It stands to reason that this can be easily optimized by using parallelism. Especially for huge arrays with thousands or millions of elements. It also stands to reason that the processing time with parallelism should take as much as regular time divided by the number of CPU cores. As it turns out, this feat is not that easy to achieve.
In .NET Core 3.0 we are introducing a new type of application template called Worker Service. This template is intended to give you a starting point for writing long running services in .NET Core. In this walkthrough we will create a worker and run it as a Windows Service.
C# 7.2 added the ability to mark a struct declaration as readonly. This has the effect of guaranteeing that no member of the struct can mutate its contents as it ensures every field is marked as readonly. This guarantee is imporant because it allows the compiler to avoid defensive copies of struct values in cases where the underlying location is considered readonly. For example when invoking members of a struct which is stored in a readonly field.
A straight forward way to create JWTs thats geared towards Asp.Net Identity. Converting to Token based identity management for login can be intimidating but don't let it stop you! Here is a quick (read as not perfect) way to get your hands on creating valid JWTs. I am going to take some liberties and assume a single service is responsible for Authorizing and Issuing tokens. Once you feel confident with this material then you can use an authority/Identity server with this code too.