Skip to content

Latest commit

 

History

58 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DesignPatternRefresher-Decorator-Using-DI

The Decorator Pattern is a structural design pattern that allows behavior to be added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class. It is achieved by creating a set of decorator classes used to wrap concrete components.

Here is a WeatherForecst example, where WeatherForeCachingDecorator class is used as a wrapper to add more functionality(Caching) to a concrete implementation WeaterForecast service, and register the decorator class in .Net DI container. Check the repo for more info. Enjoy! Using dependency inject capability as a decorator on concrete implementation

image

image

About

Using dependency inject capability as a decorator on a concrete implentations

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages