Google Protocol Buffer(protobuf) 使用和研究
2015-03-28 16:00
375 查看
由于项目使用的是c#,所以下面的范例也是用于c#
一、安装Google Protocol Buffer
https://github.com/google/protobuf
二、编写一个bat文件处理文件,批量生成c#文件,如:
三、编写.proto文件。
四、使用.bat文件编译.proto文件。生成对应c#文件。
五、
。
。
。
一、安装Google Protocol Buffer
https://github.com/google/protobuf
二、编写一个bat文件处理文件,批量生成c#文件,如:
@echo off SETLOCAL ENABLEDELAYEDEXPANSION rem 查找文件 for /f "delims=" %%i in ('dir /b "..\*.proto"') do ( echo %%i ) set var2=%cd% for /f "delims=" %%i in ('dir /b /s "..\*.proto"') do ( set var=%%i echo !var! set var1=%cd% copy !var! !var1! ) for /f "delims=" %%i in ('dir /b/a "*.proto"') do protogen -i:%%i -o:%%~ni.cs pause
三、编写.proto文件。
四、使用.bat文件编译.proto文件。生成对应c#文件。
五、
。
。
。
相关文章推荐
- protobuf - Google Protocol Buffer 的使用和原理
- google protocol buffer 使用之 .proto 定义规则
- iOS中ProtocolBuffer2.2的安装及google/protobuf/message.cc:130:60错误解决办法
- hdfs - ls: Failed on local exception: com.google.protobuf.InvalidProtocolBufferException:
- com.google.protobuf.InvalidProtocolBufferException: Message missing required fields: callId, status
- Google Protocol Buffer 的使用和原理
- google protobuf java 简单使用
- 使用google protobuf RPC实现echo service
- google protocol buffer在python中使用utf-8的问题
- Google Protocol Buffer 的使用和原理
- Google Protocol Buffer 的使用和原理
- Google Protobuf 使用介绍 .
- Google Protocol Buffer 的使用和原理
- Google Protocol Buffer 的使用和原理
- Google Protocol Buffer 的使用和原理
- Google Protobuf 使用介绍
- google protocol buffer的原理和使用(三)
- Google Protobuf 使用介绍
- Google Protocol Buffer 的使用和原理
- Google Protocol Buffer 的使用和原理