This is a rename [Flags]
that does not actually have a direct map in protobuf (as defined by google). I would simply overexpose as int
:
public FileAttributes Attributes {get;set;}
[ProtoMember(12)]
private int AttributesSerialized {
get { return (int)Attributes; }
set { Attributes = (FileAttributes)value; }
}
In addition, IIRC, I already encoded v2 to work this way on [Flags]
automatically and, possibly, allow pass-thru enumerations (process as a base value automatically).
source
share