↓ Skip to main content

C#

GitHub Naming Repositories

GitHub Naming Repositories

·3 mins
As part of our customer engagement, we have defined a naming convention for GitHub repositories. We have ideas around what conventions made sense, although the type of work influences these. As we tend to spend some of your engineering time working with different languages, conventions around naming formats make sense to the engineers. These, of course, might not make sense to individuals in other fields. 
gists

gists

·2 mins
GISTS – engage in chat or gossip. “I need a good friend I can always gist with.” It is always good to chat with others, which is how we learn from each other. So why don’t project teams chat with each other? In this day and age of working from home, it is becoming more and more critical to form a social network, which helps not only with mental health but also work-related ideas and time. 
Memory Leaks in .NET

Memory Leaks in .NET

·9 mins
On big enterprise projects, memory leaks are like rodents in a factory. You might not notice when there are a few of them, but you always have to be on guard in case they overpopulate, infesting the factory will cause the closer and failure of the factory.
ILogger in .NET: best practices

ILogger in .NET: best practices

·11 mins
If you are like me you will have been using ILogger in DotNet Core for some time, but you’ll have noticed there are many ways to use the logger, I found this useful article by Rico Suter going over some recommendation and best practices.
Convert an enum to a list

Convert an enum to a list

·2 mins
Here are various was to convert enums to a lists Original posting Get a List of Enum Members The idea is to use Enum.GetValues() method to get an array of the values of the constants in the enum. To get an IEnumerable<T> of all the values in the enum, call Cast<T>() on the array. To get a list, call ToList() after casting.
Circuit Breaker

Circuit Breaker

·2 mins
As defined by Polly “A circuit breaker detects the level of faults in calls placed through it, and prevents calls when a configurable fault threshold is exceeded”. The circuit breaker only makes sense when calling a less reliable API.
Fault tolerance using Polly

Fault tolerance using Polly

·3 mins
What is a Resilience Framework? Polly is classed as a resilience framework. A resilience framework is a set of libraries that help an application to recover from transient or more extended failures in services or infrastructure upon which it depends. When recovery is not possible, the resilience framework will facilitate graceful degradation of your application.
Throttling/Rate Limiter for an API

Throttling/Rate Limiter for an API

·3 mins
Throttling and rate-limiting allow you to prevent abuse of your API and ensure that your API withstands large numbers of calls (including DoS and accidental loops). With Throttling, you can set a delay on calls after an SLA tier has been exceeded, slowing down the number of requests an API client is making.
ASP.NET Core Guidance

ASP.NET Core Guidance

·11 mins
I came across a very good article on ASP.NET Core which I needed to bookmark, as it gives a clear and understandable guidance on keeping things working as efficiently as possible. https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AspNetCoreGuidance.md Here is a copy of the post
JSON Web Tokens (JWT)

JSON Web Tokens (JWT)

·5 mins
Overview JSON Web Tokens is an emerging standard. They are very close to their standardisation. IETF has taken care of that, and OpenID connect mandates the use of JSON Web token for all of the tokens that are exchanged in that protocol. this article gives you a little look, an overview of the purpose of security tokens, and, and what other types of tokens we have out there and where, where they are used. Then we have a look at the structure of a JSON Web Token, and then we’ll show you how easy it is to create and consume them using the Microsoft DotNet Core development framework.
REST Client / Server API

REST Client / Server API

·1 min
Here is a simple REST Client talking to a stand along Server API all written in DotNet Core 3.1. It is loosely based on creating a simple REST Client, an tutorial from Microsoft can give you the very basic features in DotNet Core https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/console-webapiclient
Docker cribsheet

Docker cribsheet

·3 mins
Build Build an image from the Dockerfile in the current directory and tag the image docker build -t myimage -f Dockerfile . List all images that are locally stored with the Docker Engine docker ps -a Delete an image from the local image store
NET Microservices Architecture for Containerised NET Applications

NET Microservices Architecture for Containerised NET Applications

·1 min
I came across this guide as it is an introduction to developing microservices-based applications and managing them using containers. It discusses architectural design and implementation approaches using .NET Core and Docker containers. To make it easier to get started with containers and microservices, the guide focuses on a reference containerized and microservice-based application that you can explore. The sample application is available at the eShopOnContainers GitHub repo.
event bus interface

event bus interface

·2 mins
How do you achieve anonymity between publisher and subscriber? An easy way is to let a middleman take care of all the communication. An event bus is one such middleman. An event bus is typically composed of two parts:
The Microsoft Azure Service Bus

The Microsoft Azure Service Bus

·8 mins
I’m going to take a high-level overview of the Microsoft Azure Service Bus. I’ll discuss briefly the four services that make up the Service Bus. The essence of application integration is software talking to other software. But how should this communication happen? Sometimes, a direct call via API Management is perfect. In other cases, though, this synchronous style of communication won’t work. What if both applications aren’t available at the same time, for instance? For situations like this, an asynchronous approach is required.
High-performance JSON API

High-performance JSON API

·2 mins
Raw System.Text.Json .NET Core 3.0, has shipped with the new System.Text.Json APIs, which provides built-in support for JSON, including reader/writer, read-only DOM, and serializer/deserializer. With the performance, the main improvement to the methods, check and see the typical speedups of up to 2x over Json.NET.
Async Streams

Async Streams

·1 min
The new feature Async Streams in C# has removed the scalar result limitation and allows the async method to returns multiple results. This change makes the async pattern more flexible so that you can retrieve data in lazy asynchronous sequence from a database or you can download data from an asynchronous sequence that returns the data in chunks when they become available.
Cross-Site Request Forgery (CSRF)

Cross-Site Request Forgery (CSRF)

·1 min
Description It is possible to trick a user into executing potentially dangerous actions against the target site due to a lack of Cross- Site-Request-Forgery (CSRF) protections. CSRF attacks are a class of confused deputy attacks that exploit the behaviour of browsers always sending authorization cookies in requests. The target site has no secure way of verifying the request was initiated from a link on a trusted domain.