ebceu4 / protobuf-csharp-port

Automatically exported from code.google.com/p/protobuf-csharp-port
0 stars 0 forks source link

Add option to mark generated code with attribute #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Thanks for this really nice port of PBs to C#.

I'd like to exclude the generated code from code coverage analysis, for 
which I have the standard attribute CoverageExclude.

I'd love an option like this:

option (google.protobuf.csharp_file_options).class_attribute = 
"(namespace).CoverageExclude";

Until then I'm just running a find and replace for "public sealed partial 
class". :)

Cheers.
Ben

Original issue reported on code.google.com by ben.chal...@gmail.com on 16 Jul 2009 at 3:59

GoogleCodeExporter commented 9 years ago
Sorry, this should have been a request, not a defect.

Original comment by ben.chal...@gmail.com on 16 Jul 2009 at 3:59

GoogleCodeExporter commented 9 years ago
You don't need to run a find and replace - the beauty of it being a partial 
class is 
that you can add your own partial classes to contribute to it :)

I think that would probably be a better option than making the proto more 
complicated... but I'm willing to be convinced :)

Original comment by jonathan.skeet on 19 May 2010 at 8:22

GoogleCodeExporter commented 9 years ago
This is now committed, all classes, interfaces, and enums are decorated. 

Original comment by Grig...@gmail.com on 27 May 2011 at 12:51