+ } else {
+ // TODO: Implement caching of generated generic static methods
+ //
+ // Idea:
+ //
+ // Some extra class is needed to capture variable generic type
+ // arguments. Maybe we could re-use anonymous types, with a unique
+ // anonymous method id, but they are quite heavy.
+ //
+ // Consider : "() => typeof(T);"
+ //
+ // We need something like
+ // static class Wrap<Tn, Tm, DelegateType> {
+ // public static DelegateType cache;
+ // }
+ //
+ // We then specialize local variable to capture all generic parameters
+ // and delegate type, e.g. "Wrap<Ta, Tb, DelegateTypeInst> cache;"
+ //