Local Advanced Features

These features are local to this project. They affect how you will work with the generated code. The final wire format is not affected. Any other Protocol Buffers implementation will be able to communicate using the same .proto specification.

Settings for the local features are special comments in the .proto file. They are set by a comment before the message or field starting with “:”.

All the local features are implemented in the Test project, see Test/ProtoSpec/LocalFeatures.proto .

Message options:

Field options:

Example

This example includes all the local features at once as they would be added to a .proto file

//Documentation of the Test class
//:access=private //public(default) or internal
//:triggers
//:preserverunknown
//:external
//:type=struct //class(default), struct or interface
message Test {
	//Documentation of the FieldTest property
	//:access=private //public(default), internal, protected or private
	//:codetype=DateTime // or TimeSpan, default:none
	//:external
	//:readonly
	required int32 FieldTest = 1;
...