Design Patterns
2 articles tagged with Design Patterns.
Architecture
The Strategy pattern in C#: pick an implementation by key with dependency injection
The usual shape of the Strategy pattern in .NET: one class per variant, a discriminant, IEnumerable injection, what to do when no strategy matches, and keyed services.
3 min read
Architecture
The Strategy pattern in C#: every strategy runs, one per field of an issue
A less usual shape of the Strategy pattern in C#: an issue activity log where one strategy per field runs on every change, selected by generic type rather than by key.
3 min read