Open mshami85 opened 6 years ago
Hi, do you mean MethodIplm - Inlining or something else?
Do you mind provide a code sample how you think it might work?
Yes just like MethodIplm , But unfortunately I use .net 4.0 which has no inlining, is it possible to make it?
for example instead of being like this
this.__a$_TraceAspect.YYY();
MessageBox.Show("Test");
this.__a$_TraceAspect.XXX();
the code must be like this
Console.Write("Starting....");
MessageBox.Show("Test");
Console.Write("Ended");
Ok I got it. It will never be inlined explicitly. So you will always see those aspect methods calls in debugger for example. What you can do however, is to tell JIT try to aggressively inline when translating to native code by applying [MethodImpl] to your Advice Methods.
Just want to add the reason why: Aspects has access to their class fileds, so they can share data. This means that making calls inline (in fact copying code to the target methods) means that we need to track and keep references to aspect class fields. Another reason - inline prevents aspect debugging.
Hi, I think it is making advice code inline with methods is very useful option. is there a chance to see so?