You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while building a Tracer with Mono.Cecil, I would like to just call/(insert into the IL Code) a static Method "static void Log(params object[] p)",
how could I do this?
I've added those two:
var tracerReference = module.ImportReference(typeof(TraceUtil).GetMethod("Log"));
var arrayReference = module.ImportReference(typeof(System.Array).GetMethod("Empty").MakeGenericMethod(typeof(System.Object)));
I've already checked what instructions normaly would be for this kind of scenario
'call T[] System.Array::Empty<System.Object>()' this one should be (or that's what I want to achieve) 'call !!0[] System.Array::Empty<System.Object>()'.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey,
while building a Tracer with Mono.Cecil, I would like to just call/(insert into the IL Code) a static Method "static void Log(params object[] p)",
how could I do this?
I've added those two:
and afterwards I do:
the instructions which will be produced are:
I've already checked what instructions normaly would be for this kind of scenario
'call T[] System.Array::Empty<System.Object>()' this one should be (or that's what I want to achieve) 'call !!0[] System.Array::Empty<System.Object>()'.
How could I do it?
T&R,
Sulan
Beta Was this translation helpful? Give feedback.
All reactions