More DI: Adding Exception Logging with the Decorator Pattern

added by DotNetKicks
1/14/2019 1:24:13 PM

1 Kicks, 412 Views

The Decorator Pattern lets us add functionality without changing existing classes. Previously, we looked at adding retry functionality to a data reader by using a decorator. This time, we'll add exception logging to our data reader. (For more details on how the Decorator Pattern works, see the prior article More DI: Adding Retry with the Decorator Pattern.)