Paramore Brighter: Ensuring Dependencies are Disposed.
In my previous post, I showed how to set up Paramore Brighter with the built in Dependency Injection provided with .NET Core 2. However, it wasn’t the full story. The code for this post is on GitHub....
View ArticleParamore Brighter: Implementing a fallback exception handler
So far in this series, we have a basic command processor set up and able to dispose of resources. But what happens when things go wrong? The command processor has a fallback mechanism to handle...
View ArticleParamore Brighter with Quality of Service: Retrying Commands
Paramore Brighter supports Policies to maintain quality of service. This is useful when your command makes calls to external services, whether they are databases, web services, or any other end point...
View ArticleParamore Brighter: DRY with Custom Decorated Command Handlers
You may wish to add similar functionality to many (or all) command handlers. The typical example is logging. You can decorate a command handler in a similar way to the policies I showed in previous...
View ArticleParamore Brighter: The Russian Doll Model
I’ve mentioned a bit about the attributing the handler and the step and timing parameters, but I’ve not explained them properly in previous posts (“Retrying commands” mentions steps, and “Don’t Repeat...
View ArticleComparing logically adjacent rows in a database table
If you have database table that stores something such as when an action occurred, it might be useful to work out how far apart these events are. It is easy to join different tables together, or even if...
View ArticleCreating a Throttle with ActionBlock
We have an application that needs to perform a repetitive task on many external services and record then aggregate the results. As the system has grown the number of external systems has increased...
View ArticleCreating a Throttle with an ActionBlock – Addendum (Cancelling)
In my previous post I described how to create a throttle with an action block so you wouldn’t have too many tasks running simultaneously. But what if you want to cancel the tasks? In our use case, we...
View ArticleEnsure Controller actions/classes have authorisation
A couple of years ago I wrote a unit test to ensure that all our controller actions (or Controller classes) had appropriate authorisation set up. This ensures we don’t go to production with a new...
View ArticleHow to: Tell if a PowerShell script is running as the Administrator
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) if (-not...
View ArticleReSharper test runner still going after tests complete
I’ve been writing some tests and I got this message: [RIDER LOGO] Unit Test RunnerThe process ReSharperTestRunner64:26252 has finished running tests assigned to it, but is still running.Possible...
View ArticleWhy is there a difference between decimal 0 and 0.0?
const decimal ZeroA = 0M; const decimal ZeroB = 0.0M; They’re the same thing, right? Well, almost. The equality operator says they’re the same thing. bool areSame = ZeroA == ZeroB; // is true But...
View ArticleWhy is my app not responding? Oh… I’ve hit a breakpoint!
Have you ever run your app from Visual Studio to have it suddenly stop responding and you can’t immediately see why, only to discover that you’ve hit a breakpoint and didn’t realise because Visual...
View ArticleSpeed up Visual Studio by turning off the Source Control Plug-in
I don’t use the built in source control plug in Visual Studio as I use GitKraken instead, so Visual Studio’s plug-in just sat in the background not doing much as far as I could see. Then...
View Article