Avoid creating UnknownFieldSets unless we really have to.
This commit is contained in:
parent
75f4268e60
commit
7de1aef848
11 changed files with 800 additions and 249 deletions
|
@ -246,19 +246,27 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -268,6 +276,9 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
|
|||
case 16: {
|
||||
int rawValue = input.ReadEnum();
|
||||
if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType), rawValue)) {
|
||||
if (unknownFields == null) {
|
||||
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
}
|
||||
unknownFields.MergeVarintField(2, (ulong) rawValue);
|
||||
} else {
|
||||
Type = (global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType) rawValue;
|
||||
|
@ -510,19 +521,27 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -799,19 +818,27 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
|
|
@ -54,6 +54,9 @@ namespace Google.ProtocolBuffers.ProtoGen {
|
|||
// TODO(jonskeet): Make a more efficient way of doing this
|
||||
writer.WriteLine("int rawValue = input.ReadEnum();");
|
||||
writer.WriteLine("if (!global::System.Enum.IsDefined(typeof({0}), rawValue)) {{", TypeName);
|
||||
writer.WriteLine(" if (unknownFields == null) {"); // First unknown field - create builder now
|
||||
writer.WriteLine(" unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);");
|
||||
writer.WriteLine(" }");
|
||||
writer.WriteLine(" unknownFields.MergeVarintField({0}, (ulong) rawValue);", Number);
|
||||
writer.WriteLine("} else {");
|
||||
writer.WriteLine(" {0} = ({1}) rawValue;", PropertyName, TypeName);
|
||||
|
|
|
@ -374,21 +374,29 @@ namespace Google.ProtocolBuffers.ProtoGen {
|
|||
writer.WriteLine();
|
||||
writer.WriteLine("public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {");
|
||||
writer.Indent();
|
||||
writer.WriteLine("pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);");
|
||||
writer.WriteLine("pb::UnknownFieldSet.Builder unknownFields = null;");
|
||||
writer.WriteLine("while (true) {");
|
||||
writer.Indent();
|
||||
writer.WriteLine("uint tag = input.ReadTag();");
|
||||
writer.WriteLine("switch (tag) {");
|
||||
writer.Indent();
|
||||
writer.WriteLine("case 0: {"); // 0 signals EOF / limit reached
|
||||
writer.WriteLine(" this.UnknownFields = unknownFields.Build();");
|
||||
writer.WriteLine(" if (unknownFields != null) {");
|
||||
writer.WriteLine(" this.UnknownFields = unknownFields.Build();");
|
||||
writer.WriteLine(" }");
|
||||
writer.WriteLine(" return this;");
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine("default: {");
|
||||
writer.WriteLine(" if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {");
|
||||
writer.WriteLine(" this.UnknownFields = unknownFields.Build();");
|
||||
writer.WriteLine(" if (pb::WireFormat.IsEndGroupTag(tag)) {");
|
||||
writer.WriteLine(" if (unknownFields != null) {");
|
||||
writer.WriteLine(" this.UnknownFields = unknownFields.Build();");
|
||||
writer.WriteLine(" }");
|
||||
writer.WriteLine(" return this;"); // it's an endgroup tag
|
||||
writer.WriteLine(" }");
|
||||
writer.WriteLine(" if (unknownFields == null) {"); // First unknown field - create builder now
|
||||
writer.WriteLine(" unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);");
|
||||
writer.WriteLine(" }");
|
||||
writer.WriteLine(" ParseUnknownField(input, unknownFields, extensionRegistry, tag);");
|
||||
writer.WriteLine(" break;");
|
||||
writer.WriteLine("}");
|
||||
foreach (FieldDescriptor field in sortedFields) {
|
||||
|
|
|
@ -79,11 +79,14 @@ namespace Google.ProtocolBuffers.ProtoGen {
|
|||
// TODO(jonskeet): Make a more efficient way of doing this
|
||||
writer.WriteLine("int rawValue = input.ReadEnum();");
|
||||
writer.WriteLine("if (!global::System.Enum.IsDefined(typeof({0}), rawValue)) {{", TypeName);
|
||||
writer.WriteLine(" if (unknownFields == null) {"); // First unknown field - create builder now
|
||||
writer.WriteLine(" unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);");
|
||||
writer.WriteLine(" }");
|
||||
writer.WriteLine(" unknownFields.MergeVarintField({0}, (ulong) rawValue);", Number);
|
||||
writer.WriteLine("} else {");
|
||||
writer.WriteLine(" Add{0}(({1}) rawValue);", PropertyName, TypeName);
|
||||
writer.WriteLine("}");
|
||||
|
||||
|
||||
if (Descriptor.IsPacked) {
|
||||
writer.Outdent();
|
||||
writer.WriteLine("}");
|
||||
|
|
|
@ -214,19 +214,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
|
|
@ -193,19 +193,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 8: {
|
||||
|
|
|
@ -205,19 +205,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -376,19 +384,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -594,19 +610,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 120: {
|
||||
|
@ -789,19 +813,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 202: {
|
||||
|
@ -1027,19 +1059,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 16: {
|
||||
|
@ -1227,19 +1267,27 @@ namespace Google.ProtocolBuffers.TestProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 11: {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -344,19 +344,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -722,19 +730,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -1234,19 +1250,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 8: {
|
||||
|
@ -1568,19 +1592,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -2188,19 +2220,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -2218,6 +2258,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
case 32: {
|
||||
int rawValue = input.ReadEnum();
|
||||
if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Types.Label), rawValue)) {
|
||||
if (unknownFields == null) {
|
||||
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
}
|
||||
unknownFields.MergeVarintField(4, (ulong) rawValue);
|
||||
} else {
|
||||
Label = (global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Types.Label) rawValue;
|
||||
|
@ -2227,6 +2270,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
case 40: {
|
||||
int rawValue = input.ReadEnum();
|
||||
if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Types.Type), rawValue)) {
|
||||
if (unknownFields == null) {
|
||||
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
}
|
||||
unknownFields.MergeVarintField(5, (ulong) rawValue);
|
||||
} else {
|
||||
Type = (global::Google.ProtocolBuffers.DescriptorProtos.FieldDescriptorProto.Types.Type) rawValue;
|
||||
|
@ -2617,19 +2663,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -2939,19 +2993,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -3245,19 +3307,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -3585,19 +3655,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -3963,19 +4041,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -3989,6 +4075,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
case 72: {
|
||||
int rawValue = input.ReadEnum();
|
||||
if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.Types.OptimizeMode), rawValue)) {
|
||||
if (unknownFields == null) {
|
||||
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
}
|
||||
unknownFields.MergeVarintField(9, (ulong) rawValue);
|
||||
} else {
|
||||
OptimizeFor = (global::Google.ProtocolBuffers.DescriptorProtos.FileOptions.Types.OptimizeMode) rawValue;
|
||||
|
@ -4302,19 +4391,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 8: {
|
||||
|
@ -4614,24 +4711,35 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 8: {
|
||||
int rawValue = input.ReadEnum();
|
||||
if (!global::System.Enum.IsDefined(typeof(global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.CType), rawValue)) {
|
||||
if (unknownFields == null) {
|
||||
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
}
|
||||
unknownFields.MergeVarintField(1, (ulong) rawValue);
|
||||
} else {
|
||||
Ctype = (global::Google.ProtocolBuffers.DescriptorProtos.FieldOptions.Types.CType) rawValue;
|
||||
|
@ -4912,19 +5020,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 7994: {
|
||||
|
@ -5138,19 +5254,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 7994: {
|
||||
|
@ -5364,19 +5488,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 7994: {
|
||||
|
@ -5590,19 +5722,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 7994: {
|
||||
|
@ -5849,19 +5989,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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: {
|
||||
|
@ -6142,19 +6290,27 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
|
|||
}
|
||||
|
||||
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
|
||||
pb::UnknownFieldSet.Builder unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
|
||||
pb::UnknownFieldSet.Builder unknownFields = null;
|
||||
while (true) {
|
||||
uint tag = input.ReadTag();
|
||||
switch (tag) {
|
||||
case 0: {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
if (unknownFields != null) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
default: {
|
||||
if (!ParseUnknownField(input, unknownFields, extensionRegistry, tag)) {
|
||||
this.UnknownFields = unknownFields.Build();
|
||||
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 18: {
|
||||
|
|
|
@ -158,10 +158,12 @@ namespace Google.ProtocolBuffers {
|
|||
}
|
||||
|
||||
public override TBuilder MergeUnknownFields(UnknownFieldSet unknownFields) {
|
||||
TMessage result = MessageBeingBuilt;
|
||||
result.SetUnknownFields(UnknownFieldSet.CreateBuilder(result.UnknownFields)
|
||||
.MergeFrom(unknownFields)
|
||||
.Build());
|
||||
if (unknownFields != UnknownFieldSet.DefaultInstance) {
|
||||
TMessage result = MessageBeingBuilt;
|
||||
result.SetUnknownFields(UnknownFieldSet.CreateBuilder(result.UnknownFields)
|
||||
.MergeFrom(unknownFields)
|
||||
.Build());
|
||||
}
|
||||
return ThisBuilder;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,6 +91,10 @@ namespace Google.ProtocolBuffers {
|
|||
return (WireType) (tag & TagTypeMask);
|
||||
}
|
||||
|
||||
public static bool IsEndGroupTag(uint tag) {
|
||||
return (WireType)(tag & TagTypeMask) == WireType.EndGroup;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a tag value, determines the field number (the upper 29 bits).
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Reference in a new issue