ProtocolBuffers.ProtoPrepare.GetCSType C# (CSharp) Method

GetCSType() static private method

Gets the c# representation for a given .proto type.
static private GetCSType ( ProtoTypes type ) : string
type ProtoTypes
return string
        static string GetCSType(ProtoTypes type)
        {
            switch (type) {
            case ProtoTypes.Double:
                return "double";
            case ProtoTypes.Float:
                return "float";
            case ProtoTypes.Int32:
            case ProtoTypes.Sint32:
            case ProtoTypes.Sfixed32:
                return "int";
            case ProtoTypes.Int64:
            case ProtoTypes.Sint64:
            case ProtoTypes.Sfixed64:
                return "long";
            case ProtoTypes.Uint32:
            case ProtoTypes.Fixed32:
                return "uint";
            case ProtoTypes.Uint64:
            case ProtoTypes.Fixed64:
                return "ulong";
            case ProtoTypes.Bool:
                return "bool";
            case ProtoTypes.String:
                return "string";
            case ProtoTypes.Bytes:
                return "byte[]";

            default:
                throw new NotImplementedException ();
            }
        }