Is any way to define attribute like:
public class MyAttribute : Attribute
{
void OnFunctionInvoke() { ... }
}
And mark some function with that attribute
[MyAttribute]
void SomeFunction() { ... }
When SomeFunction is invoked i want OnFunctionInvoke() to be invoked before.