kevin-montrose / Sigil

A fail-fast validating helper for .NET CIL generation
Microsoft Public License
988 stars 92 forks source link

Added LoadConstant overload with ConstructorInfo parameter #60

Open dr-BEat opened 7 years ago

dr-BEat commented 7 years ago

While working with Sigil I noticed that LoadConstant is missing a overload that takes a ConstructorInfo, I used to do this using the raw ILGenerator and it work. So I added the overload and all tests, basically they are just copied from the LoadConstant(MethodInfo) overload.

I also noticed that the documentation of OpCodes.Ldtoken here does not mention ConstructorInfo so this might also be outside the specs.