Quantcast
Channel: Andrew Lock | .NET Escapades
Browsing all 743 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Extending the calculator implementation: Creating a Simple Moving Average...

This is the third post in the series: Creating a Simple Moving Average calculator in C#. Part 1 - A Simple Moving Average calculator Part 2 - Making the calculator thread-safe Part 3 - Extending the...

View Article


Image may be NSFW.
Clik here to view.

How to stop Visual Studio from creating launchsettings.json

In this short post I show how to stop an annoying behaviour of Visual Studio where it will keep creating a launchsettings.json file for integration test projects. tl;dr; To stop Visual Studio from...

View Article


Image may be NSFW.
Clik here to view.

Benchmarking 4 reflection methods for calling a constructor in .NET

The typical way to create an object in .NET/C# is to use the new keyword. However it's also possible to create a new instance of an object using reflection. In this post I compare 4 different methods,...

View Article

Image may be NSFW.
Clik here to view.

Exploring .NET interactive notebooks with VS Code

In a recent series I described the process of creating a Simple Moving Average calculator. A couple of days later Khalid messaged me on twitter: Hey @andrewlocknet! It would be cool to see your Simple...

View Article

Image may be NSFW.
Clik here to view.

Creating Docker multi-arch images for ARM64 from Windows

In this post I describe how to create multi-architecture docker images. Specifically, I show how to create Docker images that run on ARM 64 processors (such as AWS's Graviton2 processors) from a...

View Article


Image may be NSFW.
Clik here to view.

Using SSH and localhost.run to test GitHub webhooks locally

In this post I describe how to test GitHub webHooks locally using SSH and https://localhost.run/, a service that can be used to create a public endpoint that tunnels to a website running locally....

View Article

Image may be NSFW.
Clik here to view.

Conditional compilation for ignoring method calls with the ConditionalAttribute

The other day at work I ran into an attribute I hadn't heard about, the [Conditional] attribute. In this post I start by describing conditional compilation using pre-processor directives like #if, and...

View Article

Image may be NSFW.
Clik here to view.

Adding authentication to a Blazor Server app using Auth0

In this post I show how how to add authentication to a sample ASP.NET Core Blazor Server app. The default .NET templates show how to use ASP.NET Identity or Azure for authentication, but in this post...

View Article


Image may be NSFW.
Clik here to view.

The overall design and a first look at the internals: A deep dive on...

This is the first post in the series: A deep dive on StringBuilder. Part 1 - The overall design and a first look at the internals (this post) Part 2 - Appending strings, built-in types, and lists Part...

View Article


Image may be NSFW.
Clik here to view.

Appending strings, built-in types, and lists: A deep dive on StringBuilder -...

This is the second post in the series: A deep dive on StringBuilder. Part 1 - The overall design and a first look at the internals Part 2 - Appending strings, built-in types, and lists (this post)...

View Article

Image may be NSFW.
Clik here to view.

Converting chunks to a string with ToString(): A deep dive on StringBuilder -...

This is the third post in the series: A deep dive on StringBuilder. Part 1 - The overall design and a first look at the internals Part 2 - Appending strings, built-in types, and lists Part 3 -...

View Article

Image may be NSFW.
Clik here to view.

Inserting and removing characters: A deep dive on StringBuilder - Part 4

This is the fourth post in the series: A deep dive on StringBuilder. Part 1 - The overall design and a first look at the internals Part 2 - Appending strings, built-in types, and lists Part 3 -...

View Article

Image may be NSFW.
Clik here to view.

Reducing allocations by caching with StringBuilderCache: A deep dive on...

This is the fifth post in the series: A deep dive on StringBuilder. Part 1 - The overall design and a first look at the internals Part 2 - Appending strings, built-in types, and lists Part 3 -...

View Article


Image may be NSFW.
Clik here to view.

ValueStringBuilder: a stack-based string-builder: A deep dive on...

This is the sixth post in the series: A deep dive on StringBuilder. Part 1 - The overall design and a first look at the internals Part 2 - Appending strings, built-in types, and lists Part 3 -...

View Article

Image may be NSFW.
Clik here to view.

Rebuilding StronglyTypedId as a source generator - 1.0.0-beta release: Using...

This is the seventh post in the series: Using strongly-typed entity IDs to avoid primitive obsession. Part 1 - An introduction to strongly-typed entity IDs Part 2 - Adding JSON converters to strongly...

View Article


Image may be NSFW.
Clik here to view.

Downloading artifacts from Azure DevOps using .NET

In this post I show how to use the Azure DevOps REST API to view the results of builds in Azure DevOps Pipelines for a given branch/tag, and how to download the artifacts. The hardest part of the...

View Article

Image may be NSFW.
Clik here to view.

Using Source Generators with Blazor components in .NET 6

In this post I describe a problem I discovered when upgrading my Blazor app to .NET 6. Source generators that were working fine in .NET 5 failed to discover the Blazor components in my app, due to...

View Article


Image may be NSFW.
Clik here to view.

Looking inside ConfigurationManager in .NET 6: Exploring .NET 6 - Part 1

This is the first post in the series: Exploring .NET 6. Part 1 - Looking inside ConfigurationManager in .NET 6 (this post) Part 2 - Comparing WebApplicationBuilder to the Generic Host Part 3 -...

View Article

Image may be NSFW.
Clik here to view.

Comparing WebApplicationBuilder to the Generic Host: Exploring .NET 6 - Part 2

This is the second post in the series: Exploring .NET 6. Part 1 - Looking inside ConfigurationManager in .NET 6 Part 2 - Comparing WebApplicationBuilder to the Generic Host (this post) Part 3 -...

View Article

Image may be NSFW.
Clik here to view.

Exploring the code behind WebApplicationBuilder: Exploring .NET 6 - Part 3

This is the third post in the series: Exploring .NET 6. Part 1 - Looking inside ConfigurationManager in .NET 6 Part 2 - Comparing WebApplicationBuilder to the Generic Host Part 3 - Exploring the code...

View Article
Browsing all 743 articles
Browse latest View live