Console applications are alive and kicking. Setting them up might be a bit hard. In this article I’ll explore how to create a .NET console application that provides commands using the new System.CommandLine package. This will provide arguments to command mapping out of the box. I’ll be showing how to combine it with dependency injection for even more power ⚡.
At Wehkamp we’ve been using ASP.NET for a long time. Containers brought .NET with us to our microservices architecture. We used a shell script in a special build container to build our service. Today we’ll discuss how we turned that shell script into a multi stage build Dockerfile. Goals With the new setup we have […]
When working on a project, the need arose for better handling of enums decorated with a [Flag] attribute. In a previous article we explored how to use Handlebars.NET to generate JSON strings. In this article we’ll build further on that generator to add support for enums. We will also move away from the static JsonHandlebarsDotNet to an injectable version.
I ❤️ Handlebars! So I was very very very happy to see that Handlebars was ported to .NET! It is a mega flexible templating engine as it can easily be extended. I’m currently working on a project where a I need to parse objects via JSON templates to JSON strings. This blog will show how to instruct Handlebars to parse into JSON and add some nice error messages if your template fails.
At Wehkamp we use decoration a lot. Decoration is a nice way of separating concerns from the actual code. Most of our repositories need the same set of decorators: exception logging, latency metrics and Jaeger spans. In this article I’ll be joining these 3 types of decorator into a single Swiss Army Knife decorator: one decorator to rule them all.
At Wehkamp, we use Google Analytics extensively to measure how many users are active. It is hard to correlate active users with your other statistics that “live” in Prometheus. In this blog I’ll show how you can use the Google Real Time API to produce statistics for active users, page views and screen views.
Sometimes you just need to record the original message that was submitted to your API. My colleague Onno Pierik and I encountered such an event. We needed to record the original submitted SOAP message (body) and submit it (under certain conditions) to another service. To be honest: most of the scenarios I’ve seen so far end up with memory problems, so use with caution!
Ever since I stumbled upon the Scrutor project, I wanted to write a blog about building latency and exception logging decorators. At Wehkamp we used StructureMap in the past, but as it became obsolete and swapped out, I missed the decorators. What I love about Scrutor is how it is an extension on the way […]