Is there a way to add an attribute to a method without modifying the class file?
E.g. I'm importing a WSDL which generates a Reference.cs containing a proxy class with methods.
I have written an attribute which does some work for me and adding it to the method like below, and all works fine:
Reference.cs file
public partial class Whatever
{
[MyCustomAttrubute()]
public void MyMethod(string bleh)
{
// do stuff
return;
}
}
However, my problem with this is that if the WSDL changes I will need to update it, which will automatically lose all my changes to Reference.cs. Can I add this attribute to the method from another file?