static ProtoTypes GetScalarProtoType(string type)
{
switch (type) {
case "double":
return ProtoTypes.Double;
case "float":
return ProtoTypes.Float;
case "int32":
return ProtoTypes.Int32;
case "int64":
return ProtoTypes.Int64;
case "uint32":
return ProtoTypes.Uint32;
case "uint64":
return ProtoTypes.Uint64;
case "sint32":
return ProtoTypes.Sint32;
case "sint64":
return ProtoTypes.Sint64;
case "fixed32":
return ProtoTypes.Fixed32;
case "fixed64":
return ProtoTypes.Fixed64;
case "sfixed32":
return ProtoTypes.Sfixed32;
case "sfixed64":
return ProtoTypes.Sfixed64;
case "bool":
return ProtoTypes.Bool;
case "string":
return ProtoTypes.String;
case "bytes":
return ProtoTypes.Bytes;
default:
return ProtoTypes.Unknown;
}
}