浏览代码

Merge branch 'master' of git@github.com:jskeet/dotnet-protobufs

Jon Skeet 16 年之前
父节点
当前提交
37a7983aaa
共有 3 个文件被更改,包括 1 次插入35 次删除
  1. 0 8
      src/ProtoGen/Generator.cs
  2. 1 2
      src/ProtoGen/ProtoGen.csproj
  3. 0 25
      src/ProtoGen/SourceFileGenerator.cs

+ 0 - 8
src/ProtoGen/Generator.cs

@@ -52,17 +52,9 @@ namespace Google.ProtocolBuffers.ProtoGen {
       using (TextWriter textWriter = File.CreateText(Path.Combine(options.OutputDirectory, descriptor.CSharpOptions.UmbrellaClassname + ".cs"))) {
       using (TextWriter textWriter = File.CreateText(Path.Combine(options.OutputDirectory, descriptor.CSharpOptions.UmbrellaClassname + ".cs"))) {
         TextGenerator writer = new TextGenerator(textWriter);        
         TextGenerator writer = new TextGenerator(textWriter);        
         ucg.Generate(writer);
         ucg.Generate(writer);
-        /*
-        GenerateSiblings(umbrellaSource, descriptor, descriptor.MessageTypes);
-        GenerateSiblings(umbrellaSource, descriptor, descriptor.EnumTypes);
-        GenerateSiblings(umbrellaSource, descriptor, descriptor.Services);*/
       }
       }
     }
     }
 
 
-    private static void GenerateSiblings<T>(SourceFileGenerator parentSourceGenerator, FileDescriptor file, IEnumerable<T> siblings)
-        where T : IDescriptor {
-    }
-
     /// <summary>
     /// <summary>
     /// Resolves any dependencies and converts FileDescriptorProtos into FileDescriptors.
     /// Resolves any dependencies and converts FileDescriptorProtos into FileDescriptors.
     /// The list returned is in the same order as the protos are listed in the descriptor set.
     /// The list returned is in the same order as the protos are listed in the descriptor set.

+ 1 - 2
src/ProtoGen/ProtoGen.csproj

@@ -54,7 +54,6 @@
     <Compile Include="RepeatedMessageFieldGenerator.cs" />
     <Compile Include="RepeatedMessageFieldGenerator.cs" />
     <Compile Include="RepeatedPrimitiveFieldGenerator.cs" />
     <Compile Include="RepeatedPrimitiveFieldGenerator.cs" />
     <Compile Include="ServiceGenerator.cs" />
     <Compile Include="ServiceGenerator.cs" />
-    <Compile Include="SourceFileGenerator.cs" />
     <Compile Include="DependencyResolutionException.cs" />
     <Compile Include="DependencyResolutionException.cs" />
     <Compile Include="Generator.cs" />
     <Compile Include="Generator.cs" />
     <Compile Include="GeneratorOptions.cs" />
     <Compile Include="GeneratorOptions.cs" />
@@ -84,4 +83,4 @@
   <Target Name="AfterBuild">
   <Target Name="AfterBuild">
   </Target>
   </Target>
   -->
   -->
-</Project>
+</Project>

+ 0 - 25
src/ProtoGen/SourceFileGenerator.cs

@@ -1,25 +0,0 @@
-using System.IO;
-
-namespace Google.ProtocolBuffers.ProtoGen {
-  /// <summary>
-  /// Generator to hold a TextGenerator, generate namespace aliases etc.
-  /// Each source file created uses one of these, and it can be used to create
-  /// multiple classes within the same file.
-  /// </summary>
-  internal class SourceFileGenerator  {
-
-    private readonly TextGenerator output;
-
-    private SourceFileGenerator(TextWriter writer) {
-      output = new TextGenerator(writer);
-    }
-
-    /// <summary>
-    /// Creates a ClassFileGenerator for the given writer, which will be closed
-    /// when the instance is disposed. The specified namespace is created, if it's non-null.
-    /// </summary>
-    internal static SourceFileGenerator ForWriter(TextWriter writer) {
-      return new SourceFileGenerator(writer);
-    }
-  }
-}