Background
This question relates to the new Cirrus infrastructure for Aspect Oriented Programming in Delphi Prism.
I currently have an aspect which I am Auto-Injecting into a class and am attempting to modify the target code using aMethod.SetBody function. I have structured my code thus far using the Logging example code found on the Cirrus Introduction documentation wiki as a basis.
Question
How can I access the Result of the function being injected into, both with and without the original function body being executed?
I would like to be able to set the result of the function bypassing the call to OriginalBody in one code path and as the other code path to call the OriginalBody and use the subsequent Result of the OriginalBody in my Aspect code. I originally thought that this might be the intended purpose of the Aspects.RequireResult method but this appears to force execution of the OriginalBody in my case, causing code duplication.