0
kicks
Lazy Loading with PostSharp
Recently I wanted to use PostSharp for some simplistic lazy loading, but ended up hitting a couple of problems along the way. It all started very well – I defined an OnFieldAccessAttribute, removed the field in GetOptions() and overrided OnGetValue() to lazily create the type. My creation code was something like the following: