Reputation: 9107
I have a datalayer.cs file that was generated using a code gen tool.
I am marking the class as a partial class, so I can create another file with my own hand written datalayer code.
How should I name my files?
Should I do it like this:
/data/partial/datalayer.cs /data/datalayer.cs
So when I run my codegenerator again, I just dump the file to the /partial/ folder in my source tree.
suggestions?
Upvotes: 0
Views: 442
Reputation: 178660
VS uses a Filename.Designer.cs convention for generated files. You might do something similar. For example, you might have DataLayer.cs and DataLayer.Generated.cs. I personally would keep the files next to each other in the same directory to aid in discoverability.
Upvotes: 3
Reputation: 754745
I personally use ClassName_Generated.cs for generated files. I personally prefer an _ to a . for the generated separator.
Upvotes: 0
Reputation: 56113
Partial classes which are generated by the IDE when you create a Windows.Form are named like:
/mydirectory/MyFormName.cs
/mydirectory/MyFormName.Designer.cs
So I'd suggest like:
/mydirectory/datalayer.cs
/mydirectory/datalayer.autocodegen.cs
Upvotes: 1