I want to enter the following line at the beginning of each method of my application
Trace.WriteLine(this.GetType().Name + "." + "Name of Method");
I would like to do this at compile time or build time or post build time - mostly before it gets into the hands of the client.
Is it possible?
You should learn PostSharp , which is designed for this kind of thing. I do not know if he received the attribute exactly for this use case, but I would assume that it would not be difficult to write.
EDIT: - Mono.Cecil, . , .
, , , , PostSharp, .
Source: https://habr.com/ru/post/1728338/More articles:Quick way to find the stream claimed in gdb? - objective-cFind an element in context using jQuery - jqueryError "Cannot use string offset as an array" - arrayshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1728336/how-do-i-dynamically-add-image-objects-to-the-display-and-then-interact-with-them&usg=ALkJrhgXhgERSogC7YuXDpwv7_HRvPVbEwhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1728337/how-to-add-an-ip-address-to-an-existing-network-adapter-in-windows&usg=ALkJrhh0KEl3NpbtvdmEKHfbf6DvtJe39gTraining set - share pos / neg / neutral offers - nlpZend Framework style form elements - zend-frameworkPassing objects between winform objects - c #ASP.NET: checking "reset" after calling Page_ClientValidate - javascriptDo you need to exit the blackberry simulator every time you make a change? - blackberry-simulatorAll Articles