Skip to main content

3 posts tagged with ".NET"

View All Tags

Targeted Feature Flags with Azure App Configuration and Custom ITargetingContextAccessor

· 11 min read
Kyle Oettle
Software Engineer

Hi Everyone 👋

We've all had to roll out some form of feature management, whether it was static values in an appsettings.json file or a fully managed service with feature management based on various rules.

In this post we'll be unpacking the Azure App Configuration Feature Management a little bit, using a Targeted filter and creating a custom ITargetingContextAccessor implementation.

Fun with (Enum) Flags

· 3 min read
Kyle Oettle
Software Engineer

Hi Everyone 👋

One of the lesser known but my favorite features of Enums are Flags

Enums are usually used to indicate a single option, like a day of the week, your favorite colour, pizza size... We all get it, we've all used it, but how often have you seen an array of Enums being passed around in your code?
There was probably a good reason for it if you have. Maybe an array of features, an array of preferred contact methods, supported payment methods? This is what's really cool about Flags, You can capture a selection of enums in a single value :satisfied:

Async (a)void

· 6 min read
Kyle Oettle
Software Engineer

Hi Everyone 👋

A while ago we had the unfortunate event of breaking prod 😮
We made some small changes to our .net api, all tests passed, everything was good and the world slept peacefully that night, until we saw the service started going down seemingly at random! Turns out it wasn't random at all, it was a pesky async void which we missed changing to an async Task and it caused the entire service to come crumbling down.

Most of us know that when you want to change a method from sync to async, you change the calls to an async Task, it's pretty simple and straight forward, but we forgot to change one of the signatures from void DoSomething() to async Task DoSomething() and left it as async void DoSomething()