Simple example to show how to use a delegate factory