I'd like to create a new custom "[Tag]" with a particular semantic purpose.
Image you have a list of method in a service and you want some of them to Log some information: actually I'm doing something like
public void Method(parameters)
{
LogMethodCall();
//Method Body
}
Actually I'd prefere to create something like:
[LogEnabled]
public void Method(parameters)
{
//Method Body
}
And have somewhere stored something like:
if (Method is LogEnabled) LogMethodCall()
Is this possible? Exist this possibility in C#? How is it called?