In my current project I want to replace a library I'm using by an other one
I will write my self.
1st I want to write a skeletton library which feature all type/method I'm
using (with no real code inside).
For that I would like to go through my project, track every library object
I'm using and all the method I'm calling and create a mock-up library where
I would define all the types and and methods I'm using from the 3rd party
lib.
The thing is I would like to do it automatically through someting like
reflection.
Is there a way I could do that simply? Any tips or link?
==== here is an example: current code below ====
class MyProject
{
void AMethod(ALibObject1 obj)
{
obj.Method1();
ALibObject2 o2 = obj.Method2();
o2.Method3(new LibObject3());
}
}
I want to go through the code (or probably compiled assembly) above
(automatically), by using reflection on the assembly (or something similar)
and produce:
public class ALibObject1
{
public void Method1() {}
ALibObject2 Method2() { return null; }
}
public class ALibObject2
{
public void Method3(LibObject3 obj) {}
}
public class LibObject3
{
}
====================
Any tip on how to do that simply in an automated way?