开发者

How do I customize the namespace in code generated by protobuf-net

I have a proto file as follows

import "protobuf_net.proto";
option (protobuf_net.namespace) = "My.Test";

enum TestEnum {
    FIRST = 0;
    SECOND = 1;
    THIRD = 2;
}

I'm expecting the resulting TestEnum to be in the My.Test namespace, but the namespace开发者_如何学运维 is just the name of the file (or a package if I define one). Any suggestions as to what I'm doing wrong?


From memory, this uses the existing proto syntax

package My.Test {
     enum TestEnum {
        FIRST = 0;
        SECOND = 1;
        THIRD = 2;
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜