diff options
author | Jon Skeet <skeet@pobox.com> | 2010-11-03 11:21:52 +0000 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2010-11-03 11:21:52 +0000 |
commit | 57599ef16daeda48381711dae1600cf0c467689d (patch) | |
tree | 3030080b7b81b64cc1b43f107ad255acad16cbca /src/ProtoGen/Program.cs | |
parent | c58ce5dc0c6dbe792ad53c63926bb3e8facef47b (diff) | |
download | protobuf-57599ef16daeda48381711dae1600cf0c467689d.tar.gz protobuf-57599ef16daeda48381711dae1600cf0c467689d.tar.bz2 protobuf-57599ef16daeda48381711dae1600cf0c467689d.zip |
A few stylistic issues
Diffstat (limited to 'src/ProtoGen/Program.cs')
-rw-r--r-- | src/ProtoGen/Program.cs | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/src/ProtoGen/Program.cs b/src/ProtoGen/Program.cs index a9bc47ce..e8c486cf 100644 --- a/src/ProtoGen/Program.cs +++ b/src/ProtoGen/Program.cs @@ -1,4 +1,5 @@ #region Copyright notice and license + // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://github.com/jskeet/dotnet-protobufs/ @@ -30,6 +31,7 @@ // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #endregion using System; @@ -40,12 +42,12 @@ namespace Google.ProtocolBuffers.ProtoGen { /// <summary> /// Entry point for the Protocol Buffers generator. /// </summary> - class Program { - internal static int Main(string[] args) { + internal class Program { + internal static int Main(string[] args) { try { // Hack to make sure everything's initialized DescriptorProtoFile.Descriptor.ToString(); - GeneratorOptions options = ParseCommandLineArguments(args); + GeneratorOptions options = new GeneratorOptions {Arguments = args}; IList<string> validationFailures; if (!options.TryValidate(out validationFailures)) { @@ -58,25 +60,13 @@ namespace Google.ProtocolBuffers.ProtoGen { Generator generator = Generator.CreateGenerator(options); generator.Generate(); return 0; - } catch (Exception e) { + } + catch (Exception e) { Console.Error.WriteLine("Error: {0}", e.Message); Console.Error.WriteLine(); Console.Error.WriteLine("Detailed exception information: {0}", e); return 1; } } - - private static GeneratorOptions ParseCommandLineArguments(string[] args) { - GeneratorOptions options = new GeneratorOptions(); - //string baseDir = "c:\\Users\\Jon\\Documents\\Visual Studio 2008\\Projects\\ProtocolBuffers"; - //options.OutputDirectory = baseDir + "\\tmp"; - //options.InputFiles = new[] { baseDir + "\\protos\\nwind-solo.protobin" }; - - //ROK 2010-09-03 - fixes to allow parsing these options... - //options.OutputDirectory = "."; - //options.InputFiles = args; - options.Arguments = args; - return options; - } } }
\ No newline at end of file |