Inject arbitrary IL code at compile time.
TypeRef.FromDll
to TypeRef.FromDllFile
TypeRef.FromDllFile
overload with a Type
parametertypeof(...).FullName
recognitionTypeRef.FromDll
method, see #31IL.PushInRef
to use ref readonly
instead of in
, to make the reference usage stand out at the call siteMethodRef.FromDelegate
(which emits cached delegate instances)IL.Push
stack validatorIL.Push
are validated (#25). The new algorithm is more rigorous, so code that happenned to work previously could now be rejected.IL.EnsureLocal
method which forces the compiler to emit an IL local for the local variable supplied as parameter, instead of keeping it on the evaluation stack. This can enable the local to be used with IL.Push
in optimized builds.IL.Emit.No
which takes an enum argument.IL.Push*
methods.MethodRef.Operator
methods (#22)MethodRef.Method
and constructor overloads that include the method return type in the constraints (can be useful for conversion operators if you don't want to use MethodRef.Operator
)MethodRef.FromDelegate
(#21)