While this could be solved (with a workaround: include all possible types in the exe assembly), it would require quite some work.
Another approach could be that for every type processed I also process all override methods. This should cover everything, except for object initialization using reflection: but that's something I can do nothing about. Thank you very much for your help! And thanks for the awesome library! 2010/6/30 Jb Evain <[email protected]> > On Wed, Jun 30, 2010 at 8:47 PM, Gábor Kozár <[email protected]> wrote: > > Can you explain a little bit more about this? I mean, it's just a matter > of > > knowing the type. Unless you're using reflection, it should work - as I > > imagine it. > > There are jillions of cases. > > class Foo { public override string ToString () { return "foo"; } } > class Bar { public override string ToString () { return "Bar"; } } > > static void Main () > { > object o = Settings.UseFoo ? new Foo () : new Bar (); > Console.WriteLine (o.ToString ()); > } > > What method will be called at o.ToString (). Well it depends. And it > will be pretty much the same at each call site. Basically, all the > possibilities will tend to be the whole set of method that override > the one that is called. > > -- > Jb Evain <[email protected]> > > -- > -- > mono-cecil > -- -- mono-cecil
