charlessolar / Aggregates.NET

.NET event sourced domain driven design model via NServiceBus and GetEventStore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Try to avoid ReadOnlySettings usage in behaviors

danielmarbach opened this issue · comments

Just a best-practice we apply in our code bases. We extract the settings relevant for a behavior from the feature context and pass them in strongly typed into the behaviors. With that approach the settings retrieval belongs to the bootstrapping / startup phase and you think twice before you access the settings in an Invoke call (which would have implications like unnecessary allocations due to the nature of the settings dictionary)

Roger that - thanks for taking a look