Here are couple of minor and easy tweaks for slice2cs:
1. Add System.CodeDom.Compiler.GeneratedCodeAttribute to all the classes in the resulting .cs file. This notifies code analysis tools, such as FXCop, that the code is generated and can be (optionally) ignored.
2. Add "#pragma warning disable 1591" to the top of each generated cs file. This suppresses the "Missing XML comments" warning when you enable generating an XML documentation file for your project. Ideally, all the types and members would be documented as this would provide Intellisense in Visual Studio, but the easy way is to just disable the warning for the file.
3. This might be a little more work, but a "csartial" metadata directive that would add the partial keyword to a class. This would make it possible to add methods, properties, etc to a class that are C# specific without deriving a new type.

artial" metadata directive that would add the partial keyword to a class. This would make it possible to add methods, properties, etc to a class that are C# specific without deriving a new type.
Reply With Quote