Closed furesoft closed 2 years ago
package com.Furesoft;
message Uri {
optional string scheme = 1 [default = "http"];
optional int32 port = 2 [default = 80];
required string host = 3;
optional Path path = 4;
optional Credentials Credentials = 5;
extensions 6 to max;
message Credentials {
required string username = 1;
required string password = 2;
}
message Path {
optional string file = 1;
optional string query = 2;
optional string segment = 3;
optional string folder = 4;
}
}
extend Uri {
required int32 id = 7;
}
but there is no code for the extended stuff
here a sample usage
uri.SetExtension(Fields.id, 5);
uri.GetExtension(Fields.id);
At code generation time this is all statically known so one could have the property
uri.ExtensionId
or even more directly(assuming there are no name collisions)
uri.Id
Would the deserializer have to be more forgiving since some other implementation might have been using other wire-types with the same extension id?
Can you provide a sample .proto to show the functionality needed?