Home Bug Reports

slice2cs 3.3.0 Improvements

apwdapwd Member Cory ThomasOrganization: Altep, Inc.Project: Distributed job processing
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 "cs:partial" 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.

Comments

  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    Thanks for the suggestions! We'll have a look at this for the next major release.
  • nachiketnachiket Member Nachiket ShahOrganization: Barclays CapitalProject: FLOW
    Hi michi,

    Are partial classes available in 3.4 release?
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    Yes. If you grab 3.4b, you'll find that classes, interfaces, structs, and exceptions are now generated as partial.

    Cheers,

    Michi.
  • masariellomasariello Member Alessio MassaroOrganization: VTB CapitalProject: Quantitative Analytics Library
    Hi Michi,

    now that item 3 (partial classes) is out in 3.4, when do you think Cory's items 1 (GeneratedCodeAttribute) and 2 (disable warning 1591) will be released?

    Cory calls them minor tweaks, but these simple features would make a big difference in my project, as the work-arounds/consequences are rather intrusive.

    Re item 2
    If a #pragma looks ugly, prepending a line with just a "///" before every undocumented class, interface and method will do just as fine.

    Thanks
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Alessio,

    Welcome to our forums!

    These features are under consideration, but it's unclear when we'll get to them.

    If you are working on a commercial project or can't wait, please contact [email protected] and I am sure we'll be able to help.

    Thanks,
    Bernard
Sign In or Register to comment.