I was wondering how to go about writing a custom attribute which can access both the input and output parameters of a function.
Below is an example of what I wish to achieve
[CustomAttribute("Creating Foo")]
public Foo CreateFoo(Foo newFoo)
{
//do logic
return newlyCreatedFoo;
}
From this, the CustomAttribute
will create an entry in a DB with the "Creating Foo" tag, which is easy enough to do, but I want to be able to access both newFoo
and newlyCreatedFoo
as well. Is this possible?