C# Class CompileProtobufToCSharp.Compile

The compile.
Show file Open project: mreu/ProtobufLanguageService Class Usage Examples

Public Methods

Method Description
Run ( string proto ) : void

Run the whole process.

Private Methods

Method Description
CompileProto ( ) : bool

Compile the proto file.

CopyFile ( ) : void

Generate the xml file.

Copy the protobuf to the temp folder and convert it to UTF-8 without BOF, otherwise protov cannot read the file.

ErrorDataReceived ( object sender, DataReceivedEventArgs e ) : void

Receive the error messages.

GenerateCode ( ) : void

Generate the code file.

GetProtocVersion ( ) : void

Get the protoc version number.

OutputDataReceived ( object sender, DataReceivedEventArgs e ) : void

Receive the info messages.

PrepareProtoc ( ) : bool

Get protoc from the resources and copy it to the temp folder.

RunProtoc ( string parms ) : bool

Run protoc to compile the proto file.

ToCamelCase ( string name ) : string

Convert name to camelCase.

ToPascalCase ( string name ) : string

Convert name to PascalCase.

WriteEnums ( StreamWriter file, IEnumerable enums, bool first ) : void

Write the enums.

WriteFields ( StreamWriter file, IEnumerable fields, bool obsolete ) : void
WriteLineIntended ( StreamWriter file, string text ) : void

Write the line intended.

WriteMessages ( StreamWriter file, IEnumerable messages, bool first ) : void
WriteServices ( StreamWriter file, IEnumerable services, bool first ) : void

Method Details

Run() public method

Run the whole process.
public Run ( string proto ) : void
proto string /// The path to the protbuf file. ///
return void