How to create a singleton class which inherit from MarkUpExtension class?
Take a look at this. Just add that functionality onto your class and it should work. Make sure there's no public constructor of any kind.