Skip to content

Instantly share code, notes, and snippets.

@vasily-kirichenko
Created July 12, 2011 03:55
Decorator pattern
public interface Abstraction
{
void Proc();
}
public class Impl1 : Abstraction
{
public void Proc()
{
}
}
public class Impl2 : Abstraction
{
public Impl2(Abstraction inner)
{
_inner = inner;
}
public void Proc()
{
// do some extra stuff
_inner.Proc();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment