I'm using protobuf-net (thanks Marc :) ) to serialize my object model, but I want the object model not to be visible outside my assembly (specifically, I want it to be internal).
By default protobuf-net seems to generate public partial classes. Can I tell it to mark the class internal
?
Here's a cut down version of my .proto
file:
package MyProject.Core.Persistence;
option optimize_for = SPEED;
message DataObject {
required string name = 1;
required int32 id = 2;
}
Which generates the following class definition:
[global::System.Serializable,
global::ProtoBuf.ProtoContract(Name=@"DataObject")]
public partial class DataObject : global::ProtoBuf.IExtensible
{
public DataObject () {}
...
}
Not at the moment; however you can edit csharp.xslt
to suit your own needs.
This doesn't seem a common case, but it could be added as an option easily enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With