I am trying to automate the generation and cleanup of partial classes created using the .net framework XSD. My main problem is that [System.Diagnostics.DebuggerStepThroughAttribute ()] affects the code in my partial class as well as the automatically generated one. I can remove the insult attribute in the same batch file that I use to create the files.
However, I do not want to enter into all the properties of the auto-generated file. I can stop the debugger from entering each property by applying [System.Diagnostics.DebuggerStepThrough ()] to the get and set methods. Can I do this through a batch file? without the need to install / configure a third-party scripting language for text processing?
Example property with added attributes:
public string FileFormatVersion { [System.Diagnostics.DebuggerStepThrough()] get { return this.fileFormatVersionField; } [System.Diagnostics.DebuggerStepThrough()] set { this.fileFormatVersionField = value; } }
Link to delete lines through a batch file (the first part of the necessary cleaning) Delete specific lines in a txt file through a batch file
source share