aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs')
-rw-r--r--src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs270
1 files changed, 162 insertions, 108 deletions
diff --git a/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs b/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
index d4e5126e..a343587e 100644
--- a/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
+++ b/src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
@@ -400,14 +400,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -430,6 +428,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -811,14 +814,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -880,6 +881,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -1358,14 +1364,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -1390,6 +1394,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -1723,14 +1732,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -1790,6 +1797,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -2385,14 +2397,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -2462,6 +2472,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -2850,14 +2865,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -2893,6 +2906,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -3202,14 +3220,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -3243,6 +3259,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -3538,14 +3559,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -3581,6 +3600,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -3909,14 +3933,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -3954,6 +3976,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -4382,14 +4409,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -4448,6 +4473,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -4838,14 +4868,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -4876,6 +4904,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -5228,14 +5261,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -5282,6 +5313,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -5579,14 +5615,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -5609,6 +5643,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -5833,14 +5872,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -5863,6 +5900,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -6087,14 +6129,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -6117,6 +6157,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -6341,14 +6386,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -6371,6 +6414,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -6635,14 +6683,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -6667,6 +6713,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}
@@ -6959,14 +7010,12 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null;
- while (true) {
- uint tag = input.ReadTag();
+ uint tag;
+ string field_name;
+ while (input.ReadTag(out tag, out field_name)) {
switch (tag) {
case 0: {
- if (unknownFields != null) {
- this.UnknownFields = unknownFields.Build();
- }
- return this;
+ throw InvalidProtocolBufferException.InvalidTag();
}
default: {
if (pb::WireFormat.IsEndGroupTag(tag)) {
@@ -7009,6 +7058,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
}
}
+
+ if (unknownFields != null) {
+ this.UnknownFields = unknownFields.Build();
+ }
+ return this;
}