Эх сурвалжийг харах

Include missing generated files

Jon Skeet 16 жил өмнө
parent
commit
0864d30b97

+ 109 - 0
src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs

@@ -103,6 +103,47 @@ namespace Google.ProtocolBuffers.TestProtos {
       get { return customized_; }
     }
     
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasNormal) {
+        output.WriteString(1, Normal);
+      }
+      if (HasOptionsMessage_) {
+        output.WriteString(2, OptionsMessage_);
+      }
+      if (HasCustomName) {
+        output.WriteString(3, CustomName);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasNormal) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Normal);
+        }
+        if (HasOptionsMessage_) {
+          size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_);
+        }
+        if (HasCustomName) {
+          size += pb::CodedOutputStream.ComputeStringSize(3, CustomName);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
     public static OptionsMessage ParseFrom(pb::ByteString data) {
       return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
     }
@@ -178,6 +219,74 @@ namespace Google.ProtocolBuffers.TestProtos {
         return returnMe;
       }
       
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is OptionsMessage) {
+          return MergeFrom((OptionsMessage) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(OptionsMessage other) {
+        if (other == OptionsMessage.DefaultInstance) return this;
+        if (other.HasNormal) {
+          Normal = other.Normal;
+        }
+        if (other.HasOptionsMessage_) {
+          OptionsMessage_ = other.OptionsMessage_;
+        }
+        if (other.HasCustomName) {
+          CustomName = other.CustomName;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0: {
+              if (unknownFields != null) {
+                this.UnknownFields = unknownFields.Build();
+              }
+              return this;
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+              break;
+            }
+            case 10: {
+              Normal = input.ReadString();
+              break;
+            }
+            case 18: {
+              OptionsMessage_ = input.ReadString();
+              break;
+            }
+            case 26: {
+              CustomName = input.ReadString();
+              break;
+            }
+          }
+        }
+      }
+      
       
       public bool HasNormal {
         get { return result.HasNormal; }

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 884 - 0
src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs


+ 218 - 0
src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs

@@ -141,6 +141,59 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       get { return nestClasses_; }
     }
     
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasNamespace) {
+        output.WriteString(1, Namespace);
+      }
+      if (HasUmbrellaClassname) {
+        output.WriteString(2, UmbrellaClassname);
+      }
+      if (HasPublicClasses) {
+        output.WriteBool(3, PublicClasses);
+      }
+      if (HasMultipleFiles) {
+        output.WriteBool(4, MultipleFiles);
+      }
+      if (HasNestClasses) {
+        output.WriteBool(5, NestClasses);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasNamespace) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, Namespace);
+        }
+        if (HasUmbrellaClassname) {
+          size += pb::CodedOutputStream.ComputeStringSize(2, UmbrellaClassname);
+        }
+        if (HasPublicClasses) {
+          size += pb::CodedOutputStream.ComputeBoolSize(3, PublicClasses);
+        }
+        if (HasMultipleFiles) {
+          size += pb::CodedOutputStream.ComputeBoolSize(4, MultipleFiles);
+        }
+        if (HasNestClasses) {
+          size += pb::CodedOutputStream.ComputeBoolSize(5, NestClasses);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
     public static CSharpFileOptions ParseFrom(pb::ByteString data) {
       return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
     }
@@ -216,6 +269,88 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         return returnMe;
       }
       
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is CSharpFileOptions) {
+          return MergeFrom((CSharpFileOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(CSharpFileOptions other) {
+        if (other == CSharpFileOptions.DefaultInstance) return this;
+        if (other.HasNamespace) {
+          Namespace = other.Namespace;
+        }
+        if (other.HasUmbrellaClassname) {
+          UmbrellaClassname = other.UmbrellaClassname;
+        }
+        if (other.HasPublicClasses) {
+          PublicClasses = other.PublicClasses;
+        }
+        if (other.HasMultipleFiles) {
+          MultipleFiles = other.MultipleFiles;
+        }
+        if (other.HasNestClasses) {
+          NestClasses = other.NestClasses;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0: {
+              if (unknownFields != null) {
+                this.UnknownFields = unknownFields.Build();
+              }
+              return this;
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+              break;
+            }
+            case 10: {
+              Namespace = input.ReadString();
+              break;
+            }
+            case 18: {
+              UmbrellaClassname = input.ReadString();
+              break;
+            }
+            case 24: {
+              PublicClasses = input.ReadBool();
+              break;
+            }
+            case 32: {
+              MultipleFiles = input.ReadBool();
+              break;
+            }
+            case 40: {
+              NestClasses = input.ReadBool();
+              break;
+            }
+          }
+        }
+      }
+      
       
       public bool HasNamespace {
         get { return result.HasNamespace; }
@@ -346,6 +481,35 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
       get { return propertyName_; }
     }
     
+    public override bool IsInitialized {
+      get {
+        return true;
+      }
+    }
+    
+    public override void WriteTo(pb::CodedOutputStream output) {
+      if (HasPropertyName) {
+        output.WriteString(1, PropertyName);
+      }
+      UnknownFields.WriteTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public override int SerializedSize {
+      get {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+        
+        size = 0;
+        if (HasPropertyName) {
+          size += pb::CodedOutputStream.ComputeStringSize(1, PropertyName);
+        }
+        size += UnknownFields.SerializedSize;
+        memoizedSerializedSize = size;
+        return size;
+      }
+    }
+    
     public static CSharpFieldOptions ParseFrom(pb::ByteString data) {
       return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
     }
@@ -421,6 +585,60 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
         return returnMe;
       }
       
+      public override Builder MergeFrom(pb::IMessage other) {
+        if (other is CSharpFieldOptions) {
+          return MergeFrom((CSharpFieldOptions) other);
+        } else {
+          base.MergeFrom(other);
+          return this;
+        }
+      }
+      
+      public override Builder MergeFrom(CSharpFieldOptions other) {
+        if (other == CSharpFieldOptions.DefaultInstance) return this;
+        if (other.HasPropertyName) {
+          PropertyName = other.PropertyName;
+        }
+        this.MergeUnknownFields(other.UnknownFields);
+        return this;
+      }
+      
+      public override Builder MergeFrom(pb::CodedInputStream input) {
+        return MergeFrom(input, pb::ExtensionRegistry.Empty);
+      }
+      
+      public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+        pb::UnknownFieldSet.Builder unknownFields = null;
+        while (true) {
+          uint tag = input.ReadTag();
+          switch (tag) {
+            case 0: {
+              if (unknownFields != null) {
+                this.UnknownFields = unknownFields.Build();
+              }
+              return this;
+            }
+            default: {
+              if (pb::WireFormat.IsEndGroupTag(tag)) {
+                if (unknownFields != null) {
+                  this.UnknownFields = unknownFields.Build();
+                }
+                return this;
+              }
+              if (unknownFields == null) {
+                unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
+              }
+              ParseUnknownField(input, unknownFields, extensionRegistry, tag);
+              break;
+            }
+            case 10: {
+              PropertyName = input.ReadString();
+              break;
+            }
+          }
+        }
+      }
+      
       
       public bool HasPropertyName {
         get { return result.HasPropertyName; }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно