Using T4 code generation, is it possible to access the types defined in the current project?
For example, if I have an interface and I want to delegate its implementation to another class, i.e.
interface IDoSomething {
public void do_something();
}
class DoSomethingImpl : IDoSomething {
public void do_something() {
// implementation...
}
}
class SomeClass : IDoSomething {
IDoSomething m_doSomething = new DoSomethingImpl();
// forward calls to impl object
public void do_something() {
m_doSomething.do_something();
}
}
I would like to automate the call-forwarding in SomeClass
with code generation; is this possible?