Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1438 lines
57 KiB

// Generated by the protocol buffer compiler. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestMessageSetProtoFile {
#region Descriptor
public static pbd::FileDescriptor Descriptor {
get { return descriptor; }
}
private static readonly pbd::FileDescriptor descriptor = pbd::FileDescriptor.InternalBuildGeneratedFileFrom (
new byte[] {
0x0a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x75, 0x6e,
0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x22, 0x1e, 0x0a, 0x0e,
0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x2a, 0x08, 0x08, 0x04, 0x10, 0x80,
0x80, 0x80, 0x80, 0x02, 0x3a, 0x02, 0x08, 0x01, 0x22, 0x51, 0x0a, 0x17, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x0b, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73,
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x18, 0x54, 0x65, 0x73, 0x74,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x31,
0x12, 0x09, 0x0a, 0x01, 0x69, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x32, 0x6f, 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73,
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x18, 0xb0, 0xa6, 0x5e, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x2b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e,
0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x6f, 0x6e, 0x31, 0x22, 0x98, 0x01, 0x0a, 0x18, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x53, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x12, 0x0b, 0x0a, 0x03, 0x73, 0x74, 0x72,
0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x32, 0x6f, 0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65,
0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x18, 0xf9, 0xbb, 0x5e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x22,
0x6e, 0x0a, 0x0d, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x04,
0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0a, 0x32, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x53, 0x65, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x1a, 0x28, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0f, 0x0a,
0x07, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x02, 0x28, 0x05, 0x12, 0x0f, 0x0a, 0x07, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x02, 0x28, 0x0c, 0x42, 0x44, 0x48, 0x01, 0xc2, 0x3e, 0x21, 0x47, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73,
0x2e, 0x54, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xca, 0x3e, 0x1b, 0x55, 0x6e, 0x69, 0x74, 0x54, 0x65,
0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c,
0x65,
}, new pbd::FileDescriptor[] {
});
#endregion
#region Extensions
#endregion
#region Static variables
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSet__Descriptor
= Descriptor.MessageTypes[0];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSet__Descriptor,
new string[] { },
typeof (self::TestMessageSet),
typeof (self::TestMessageSet.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor
= Descriptor.MessageTypes[1];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor,
new string[] { "MessageSet", },
typeof (self::TestMessageSetContainer),
typeof (self::TestMessageSetContainer.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor
= Descriptor.MessageTypes[2];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor,
new string[] { "I", },
typeof (self::TestMessageSetExtension1),
typeof (self::TestMessageSetExtension1.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor
= Descriptor.MessageTypes[3];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor,
new string[] { "Str", },
typeof (self::TestMessageSetExtension2),
typeof (self::TestMessageSetExtension2.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet__Descriptor
= Descriptor.MessageTypes[4];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet__Descriptor,
new string[] { "Item", },
typeof (self::RawMessageSet),
typeof (self::RawMessageSet.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor
= internal__static_protobuf_unittest_RawMessageSet__Descriptor.NestedTypes[0];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor,
new string[] { "TypeId", "Message", },
typeof (self::RawMessageSet.Types.Item),
typeof (self::RawMessageSet.Types.Item.Builder));
#endregion
}
#region Enums
#endregion
#region Messages
public sealed partial class TestMessageSet : pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder> {
// Use TestMessageSet.CreateBuilder() to construct.
private TestMessageSet() {}
private static readonly TestMessageSet defaultInstance = new TestMessageSet();
public static TestMessageSet DefaultInstance {
get { return defaultInstance; }
}
public override TestMessageSet DefaultInstanceForType {
get { return defaultInstance; }
}
public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable; }
}
public override bool IsInitialized {
get {
if (!ExtensionsAreInitialized) return false;
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
pb::ExtendableMessage<TestMessageSet, TestMessageSet.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteAsMessageSetTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSizeAsMessageSet;
memoizedSerializedSize = size;
return size;
}
}
public static self::TestMessageSet ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSet ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSet ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSet parseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSet ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSet ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSet ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSet ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override IBuilder<self::TestMessageSet> CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSet prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::ExtendableBuilder<self::TestMessageSet, self::TestMessageSet.Builder> {
// Construct using self::TestMessageSet.CreateBuilder()
internal Builder() {}
self::TestMessageSet result = new self::TestMessageSet();
protected override self::TestMessageSet MessageBeingBuilt {
get { return result; }
}
public override IBuilder<self::TestMessageSet> Clear() {
result = new self::TestMessageSet();
return this;
}
public override IBuilder<self::TestMessageSet> Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSet.Descriptor; }
}
public override self::TestMessageSet DefaultInstanceForType {
get { return self::TestMessageSet.DefaultInstance; }
}
public override self::TestMessageSet BuildPartial() {
self::TestMessageSet returnMe = result;
result = null;
return returnMe;
}
protected override IBuilder MergeFromImpl(CodedInputStream data, ExtensionRegistry extensionRegistry) {
return MergeFrom(data, extensionRegistry);
}
public override IBuilder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSet) {
return MergeFrom((self::TestMessageSet) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override IBuilder<self::TestMessageSet> MergeFrom(self::TestMessageSet other) {
if (other == self::TestMessageSet.DefaultInstance) return this;
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override IBuilder<self::TestMessageSet> MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override IBuilder<self::TestMessageSet> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields =
pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0:
this.UnknownFields = unknownFields.Build();
return this;
default: {
if (!ParseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.UnknownFields = unknownFields.Build();
return this;
}
break;
}
}
}
}
}
}
public sealed partial class TestMessageSetContainer : pb::GeneratedMessage<TestMessageSetContainer, TestMessageSetContainer.Builder> {
// Use TestMessageSetContainer.CreateBuilder() to construct.
private TestMessageSetContainer() {}
private static readonly TestMessageSetContainer defaultInstance = new TestMessageSetContainer();
public static TestMessageSetContainer DefaultInstance {
get { return defaultInstance; }
}
public override TestMessageSetContainer DefaultInstanceForType {
get { return defaultInstance; }
}
public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable; }
}
// optional .protobuf_unittest.TestMessageSet message_set = 1;
private bool hasMessageSet;
private self::TestMessageSet messageSet_ = self::TestMessageSet.DefaultInstance;
public bool HasMessageSet {
get { return hasMessageSet; }
}
public self::TestMessageSet MessageSet {
get { return messageSet_; }
}
public override bool IsInitialized {
get {
if (HasMessageSet) {
if (!MessageSet.IsInitialized) return false;
}
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasMessageSet) {
output.WriteMessage(1, MessageSet);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasMessageSet) {
size += pb::CodedOutputStream.ComputeMessageSize(1, MessageSet);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static self::TestMessageSetContainer ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSetContainer parseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override IBuilder<self::TestMessageSetContainer> CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSetContainer prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<self::TestMessageSetContainer, Builder> {
// Construct using self::TestMessageSetContainer.CreateBuilder()
internal Builder() {}
self::TestMessageSetContainer result = new self::TestMessageSetContainer();
protected override self::TestMessageSetContainer MessageBeingBuilt {
get { return result; }
}
public override IBuilder<self::TestMessageSetContainer> Clear() {
result = new self::TestMessageSetContainer();
return this;
}
public override IBuilder<self::TestMessageSetContainer> Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetContainer.Descriptor; }
}
public override self::TestMessageSetContainer DefaultInstanceForType {
get { return self::TestMessageSetContainer.DefaultInstance; }
}
public override self::TestMessageSetContainer BuildPartial() {
self::TestMessageSetContainer returnMe = result;
result = null;
return returnMe;
}
protected override IBuilder MergeFromImpl(CodedInputStream data, ExtensionRegistry extensionRegistry) {
return MergeFrom(data, extensionRegistry);
}
public override IBuilder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSetContainer) {
return MergeFrom((self::TestMessageSetContainer) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override IBuilder<self::TestMessageSetContainer> MergeFrom(self::TestMessageSetContainer other) {
if (other == self::TestMessageSetContainer.DefaultInstance) return this;
if (other.HasMessageSet) {
MergeMessageSet(other.MessageSet);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override IBuilder<self::TestMessageSetContainer> MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override IBuilder<self::TestMessageSetContainer> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields =
pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0:
this.UnknownFields = unknownFields.Build();
return this;
default: {
if (!ParseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.UnknownFields = unknownFields.Build();
return this;
}
break;
}
case 10: {
self::TestMessageSet.Builder subBuilder = self::TestMessageSet.CreateBuilder();
if (HasMessageSet) {
subBuilder.MergeFrom(MessageSet);
}
input.ReadMessage(subBuilder, extensionRegistry);
MessageSet = subBuilder.BuildPartial();
break;
}
}
}
}
// optional .protobuf_unittest.TestMessageSet message_set = 1;
public bool HasMessageSet {
get { return result.HasMessageSet; }
}
public self::TestMessageSet MessageSet {
get { return result.MessageSet; }
set { SetMessageSet(value); }
}
public Builder SetMessageSet(self::TestMessageSet value) {
result.hasMessageSet = true;
result.messageSet_ = value;
return this;
}
public Builder SetMessageSet(self::TestMessageSet.Builder builderForValue) {
result.hasMessageSet = true;
result.messageSet_ = builderForValue.Build();
return this;
}
public Builder MergeMessageSet(self::TestMessageSet value) {
if (result.HasMessageSet &&
result.messageSet_ != self::TestMessageSet.DefaultInstance) {
result.messageSet_ =
self::TestMessageSet.CreateBuilder(result.messageSet_).MergeFrom(value).BuildPartial();
} else {
result.messageSet_ = value;
}
result.hasMessageSet = true;
return this;
}
public Builder ClearMessageSet() {
result.hasMessageSet = false;
result.messageSet_ = self::TestMessageSet.DefaultInstance;
return this;
}
}
}
public sealed partial class TestMessageSetExtension1 : pb::GeneratedMessage<TestMessageSetExtension1, TestMessageSetExtension1.Builder> {
// Use TestMessageSetExtension1.CreateBuilder() to construct.
private TestMessageSetExtension1() {}
private static readonly TestMessageSetExtension1 defaultInstance = new TestMessageSetExtension1();
public static TestMessageSetExtension1 DefaultInstance {
get { return defaultInstance; }
}
public override TestMessageSetExtension1 DefaultInstanceForType {
get { return defaultInstance; }
}
public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable; }
}
#region Nested types
public static class Types {
public static readonly pb::GeneratedExtensionBase<self::TestMessageSet, self::TestMessageSetExtension1> MessageSetExtension =
pb::GeneratedSingleExtension<self::TestMessageSet, self::TestMessageSetExtension1>.CreateInstance(Descriptor.Extensions[0]);
}
#endregion
// optional int32 i = 15;
private bool hasI;
private int i_ = 0;
public bool HasI {
get { return hasI; }
}
public int I {
get { return i_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasI) {
output.WriteInt32(15, I);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasI) {
size += pb::CodedOutputStream.ComputeInt32Size(15, I);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static self::TestMessageSetExtension1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSetExtension1 parseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override IBuilder<self::TestMessageSetExtension1> CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSetExtension1 prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<self::TestMessageSetExtension1, Builder> {
// Construct using self::TestMessageSetExtension1.CreateBuilder()
internal Builder() {}
self::TestMessageSetExtension1 result = new self::TestMessageSetExtension1();
protected override self::TestMessageSetExtension1 MessageBeingBuilt {
get { return result; }
}
public override IBuilder<self::TestMessageSetExtension1> Clear() {
result = new self::TestMessageSetExtension1();
return this;
}
public override IBuilder<self::TestMessageSetExtension1> Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetExtension1.Descriptor; }
}
public override self::TestMessageSetExtension1 DefaultInstanceForType {
get { return self::TestMessageSetExtension1.DefaultInstance; }
}
public override self::TestMessageSetExtension1 BuildPartial() {
self::TestMessageSetExtension1 returnMe = result;
result = null;
return returnMe;
}
protected override IBuilder MergeFromImpl(CodedInputStream data, ExtensionRegistry extensionRegistry) {
return MergeFrom(data, extensionRegistry);
}
public override IBuilder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSetExtension1) {
return MergeFrom((self::TestMessageSetExtension1) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override IBuilder<self::TestMessageSetExtension1> MergeFrom(self::TestMessageSetExtension1 other) {
if (other == self::TestMessageSetExtension1.DefaultInstance) return this;
if (other.HasI) {
I = other.I;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override IBuilder<self::TestMessageSetExtension1> MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override IBuilder<self::TestMessageSetExtension1> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields =
pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0:
this.UnknownFields = unknownFields.Build();
return this;
default: {
if (!ParseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.UnknownFields = unknownFields.Build();
return this;
}
break;
}
case 120: {
I = input.ReadInt32();
break;
}
}
}
}
// optional int32 i = 15;
public bool HasI {
get { return result.HasI; }
}
public int I {
get { return result.I; }
set { SetI(value); }
}
public Builder SetI(int value) {
result.hasI = true;
result.i_ = value;
return this;
}
public Builder ClearI() {
result.hasI = false;
result.i_ = 0;
return this;
}
}
}
public sealed partial class TestMessageSetExtension2 : pb::GeneratedMessage<TestMessageSetExtension2, TestMessageSetExtension2.Builder> {
// Use TestMessageSetExtension2.CreateBuilder() to construct.
private TestMessageSetExtension2() {}
private static readonly TestMessageSetExtension2 defaultInstance = new TestMessageSetExtension2();
public static TestMessageSetExtension2 DefaultInstance {
get { return defaultInstance; }
}
public override TestMessageSetExtension2 DefaultInstanceForType {
get { return defaultInstance; }
}
public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable; }
}
#region Nested types
public static class Types {
public static readonly pb::GeneratedExtensionBase<self::TestMessageSet, self::TestMessageSetExtension2> MessageSetExtension =
pb::GeneratedSingleExtension<self::TestMessageSet, self::TestMessageSetExtension2>.CreateInstance(Descriptor.Extensions[0]);
}
#endregion
// optional string str = 25;
private bool hasStr;
private string str_ = "";
public bool HasStr {
get { return hasStr; }
}
public string Str {
get { return str_; }
}
public override bool IsInitialized {
get {
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasStr) {
output.WriteString(25, Str);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasStr) {
size += pb::CodedOutputStream.ComputeStringSize(25, Str);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static self::TestMessageSetExtension2 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::TestMessageSetExtension2 parseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override IBuilder<self::TestMessageSetExtension2> CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSetExtension2 prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<self::TestMessageSetExtension2, Builder> {
// Construct using self::TestMessageSetExtension2.CreateBuilder()
internal Builder() {}
self::TestMessageSetExtension2 result = new self::TestMessageSetExtension2();
protected override self::TestMessageSetExtension2 MessageBeingBuilt {
get { return result; }
}
public override IBuilder<self::TestMessageSetExtension2> Clear() {
result = new self::TestMessageSetExtension2();
return this;
}
public override IBuilder<self::TestMessageSetExtension2> Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetExtension2.Descriptor; }
}
public override self::TestMessageSetExtension2 DefaultInstanceForType {
get { return self::TestMessageSetExtension2.DefaultInstance; }
}
public override self::TestMessageSetExtension2 BuildPartial() {
self::TestMessageSetExtension2 returnMe = result;
result = null;
return returnMe;
}
protected override IBuilder MergeFromImpl(CodedInputStream data, ExtensionRegistry extensionRegistry) {
return MergeFrom(data, extensionRegistry);
}
public override IBuilder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSetExtension2) {
return MergeFrom((self::TestMessageSetExtension2) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override IBuilder<self::TestMessageSetExtension2> MergeFrom(self::TestMessageSetExtension2 other) {
if (other == self::TestMessageSetExtension2.DefaultInstance) return this;
if (other.HasStr) {
Str = other.Str;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override IBuilder<self::TestMessageSetExtension2> MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override IBuilder<self::TestMessageSetExtension2> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields =
pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0:
this.UnknownFields = unknownFields.Build();
return this;
default: {
if (!ParseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.UnknownFields = unknownFields.Build();
return this;
}
break;
}
case 202: {
Str = input.ReadString();
break;
}
}
}
}
// optional string str = 25;
public bool HasStr {
get { return result.HasStr; }
}
public string Str {
get { return result.Str; }
set { SetStr(value); }
}
public Builder SetStr(string value) {
result.hasStr = true;
result.str_ = value;
return this;
}
public Builder ClearStr() {
result.hasStr = false;
result.str_ = "";
return this;
}
}
}
public sealed partial class RawMessageSet : pb::GeneratedMessage<RawMessageSet, RawMessageSet.Builder> {
// Use RawMessageSet.CreateBuilder() to construct.
private RawMessageSet() {}
private static readonly RawMessageSet defaultInstance = new RawMessageSet();
public static RawMessageSet DefaultInstance {
get { return defaultInstance; }
}
public override RawMessageSet DefaultInstanceForType {
get { return defaultInstance; }
}
public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable; }
}
#region Nested types
public static class Types {
public sealed partial class Item : pb::GeneratedMessage<Item, Item.Builder> {
// Use Item.CreateBuilder() to construct.
private Item() {}
private static readonly Item defaultInstance = new Item();
public static Item DefaultInstance {
get { return defaultInstance; }
}
public override Item DefaultInstanceForType {
get { return defaultInstance; }
}
public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor; }
}
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable; }
}
// required int32 type_id = 2;
private bool hasTypeId;
private int typeId_ = 0;
public bool HasTypeId {
get { return hasTypeId; }
}
public int TypeId {
get { return typeId_; }
}
// required bytes message = 3;
private bool hasMessage;
private pb::ByteString message_ = pb::ByteString.Empty;
public bool HasMessage {
get { return hasMessage; }
}
public pb::ByteString Message {
get { return message_; }
}
public override bool IsInitialized {
get {
if (!hasTypeId) return false;
if (!hasMessage) return false;
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
if (HasTypeId) {
output.WriteInt32(2, TypeId);
}
if (HasMessage) {
output.WriteBytes(3, Message);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
if (HasTypeId) {
size += pb::CodedOutputStream.ComputeInt32Size(2, TypeId);
}
if (HasMessage) {
size += pb::CodedOutputStream.ComputeBytesSize(3, Message);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static self::RawMessageSet.Types.Item ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::RawMessageSet.Types.Item ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet.Types.Item ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::RawMessageSet.Types.Item parseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet.Types.Item ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::RawMessageSet.Types.Item ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet.Types.Item ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::RawMessageSet.Types.Item ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override IBuilder<self::RawMessageSet.Types.Item> CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::RawMessageSet.Types.Item prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<self::RawMessageSet.Types.Item, Builder> {
// Construct using self::RawMessageSet.Types.Item.CreateBuilder()
internal Builder() {}
self::RawMessageSet.Types.Item result = new self::RawMessageSet.Types.Item();
protected override self::RawMessageSet.Types.Item MessageBeingBuilt {
get { return result; }
}
public override IBuilder<self::RawMessageSet.Types.Item> Clear() {
result = new self::RawMessageSet.Types.Item();
return this;
}
public override IBuilder<self::RawMessageSet.Types.Item> Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::RawMessageSet.Types.Item.Descriptor; }
}
public override self::RawMessageSet.Types.Item DefaultInstanceForType {
get { return self::RawMessageSet.Types.Item.DefaultInstance; }
}
public override self::RawMessageSet.Types.Item BuildPartial() {
self::RawMessageSet.Types.Item returnMe = result;
result = null;
return returnMe;
}
protected override IBuilder MergeFromImpl(CodedInputStream data, ExtensionRegistry extensionRegistry) {
return MergeFrom(data, extensionRegistry);
}
public override IBuilder MergeFrom(pb::IMessage other) {
if (other is self::RawMessageSet.Types.Item) {
return MergeFrom((self::RawMessageSet.Types.Item) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override IBuilder<self::RawMessageSet.Types.Item> MergeFrom(self::RawMessageSet.Types.Item other) {
if (other == self::RawMessageSet.Types.Item.DefaultInstance) return this;
if (other.HasTypeId) {
TypeId = other.TypeId;
}
if (other.HasMessage) {
Message = other.Message;
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override IBuilder<self::RawMessageSet.Types.Item> MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override IBuilder<self::RawMessageSet.Types.Item> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields =
pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0:
this.UnknownFields = unknownFields.Build();
return this;
default: {
if (!ParseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.UnknownFields = unknownFields.Build();
return this;
}
break;
}
case 16: {
TypeId = input.ReadInt32();
break;
}
case 26: {
Message = input.ReadBytes();
break;
}
}
}
}
// required int32 type_id = 2;
public bool HasTypeId {
get { return result.HasTypeId; }
}
public int TypeId {
get { return result.TypeId; }
set { SetTypeId(value); }
}
public Builder SetTypeId(int value) {
result.hasTypeId = true;
result.typeId_ = value;
return this;
}
public Builder ClearTypeId() {
result.hasTypeId = false;
result.typeId_ = 0;
return this;
}
// required bytes message = 3;
public bool HasMessage {
get { return result.HasMessage; }
}
public pb::ByteString Message {
get { return result.Message; }
set { SetMessage(value); }
}
public Builder SetMessage(pb::ByteString value) {
result.hasMessage = true;
result.message_ = value;
return this;
}
public Builder ClearMessage() {
result.hasMessage = false;
result.message_ = pb::ByteString.Empty;
return this;
}
}
}
}
#endregion
// repeated group Item = 1 {
private scg::IList<self::RawMessageSet.Types.Item> item_ = pbc::Lists<self::RawMessageSet.Types.Item>.Empty;
public scg::IList<self::RawMessageSet.Types.Item> ItemList {
get { return item_; }
}
public int ItemCount
{ get { return item_.Count; }
}
public self::RawMessageSet.Types.Item GetItem(int index) {
return item_ [index];
}
public override bool IsInitialized {
get {
foreach (self::RawMessageSet.Types.Item element in ItemList) {
if (!element.IsInitialized) return false;
}
return true;
}
}
public override void WriteTo(pb::CodedOutputStream output) {
foreach (self::RawMessageSet.Types.Item element in ItemList) {
output.WriteGroup(1, element);
}
UnknownFields.WriteTo(output);
}
private int memoizedSerializedSize = -1;
public override int SerializedSize {
get {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
foreach (self::RawMessageSet.Types.Item element in ItemList) {
size += pb::CodedOutputStream.ComputeGroupSize(1, element);
}
size += UnknownFields.SerializedSize;
memoizedSerializedSize = size;
return size;
}
}
public static self::RawMessageSet ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::RawMessageSet ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
}
public static self::RawMessageSet parseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::RawMessageSet ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
}
public static self::RawMessageSet ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static Builder CreateBuilder() { return new Builder(); }
public override IBuilder<self::RawMessageSet> CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::RawMessageSet prototype) {
return (Builder) new Builder().MergeFrom(prototype);
}
public sealed partial class Builder : pb::GeneratedBuilder<self::RawMessageSet, Builder> {
// Construct using self::RawMessageSet.CreateBuilder()
internal Builder() {}
self::RawMessageSet result = new self::RawMessageSet();
protected override self::RawMessageSet MessageBeingBuilt {
get { return result; }
}
public override IBuilder<self::RawMessageSet> Clear() {
result = new self::RawMessageSet();
return this;
}
public override IBuilder<self::RawMessageSet> Clone() {
return new Builder().MergeFrom(result);
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::RawMessageSet.Descriptor; }
}
public override self::RawMessageSet DefaultInstanceForType {
get { return self::RawMessageSet.DefaultInstance; }
}
public override self::RawMessageSet BuildPartial() {
if (result.item_ != pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = pbc::Lists<self::RawMessageSet.Types.Item>.AsReadOnly(result.item_);
}
self::RawMessageSet returnMe = result;
result = null;
return returnMe;
}
protected override IBuilder MergeFromImpl(CodedInputStream data, ExtensionRegistry extensionRegistry) {
return MergeFrom(data, extensionRegistry);
}
public override IBuilder MergeFrom(pb::IMessage other) {
if (other is self::RawMessageSet) {
return MergeFrom((self::RawMessageSet) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override IBuilder<self::RawMessageSet> MergeFrom(self::RawMessageSet other) {
if (other == self::RawMessageSet.DefaultInstance) return this;
if (other.item_.Count != 0) {
if (result.item_.Count == 0) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>();
}
base.AddRange(other.item_, result.item_);
}
this.MergeUnknownFields(other.UnknownFields);
return this;
}
public override IBuilder<self::RawMessageSet> MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty);
}
public override IBuilder<self::RawMessageSet> MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields =
pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
while (true) {
uint tag = input.ReadTag();
switch (tag) {
case 0:
this.UnknownFields = unknownFields.Build();
return this;
default: {
if (!ParseUnknownField(input, unknownFields,
extensionRegistry, tag)) {
this.UnknownFields = unknownFields.Build();
return this;
}
break;
}
case 11: {
self::RawMessageSet.Types.Item.Builder subBuilder = self::RawMessageSet.Types.Item.CreateBuilder();
input.ReadGroup(1, subBuilder, extensionRegistry);
AddItem(subBuilder.BuildPartial());
break;
}
}
}
}
// repeated group Item = 1 {
public scg::IList<self::RawMessageSet.Types.Item> ItemList {
get { return pbc::Lists.AsReadOnly(result.item_); }
}
public int ItemCount {
get { return result.ItemCount; }
}
public self::RawMessageSet.Types.Item GetItem(int index) {
return result.GetItem(index);
}
public Builder SetItem(int index, self::RawMessageSet.Types.Item value) {
result.item_[index] = value;
return this;
}
public Builder SetItem(int index, self::RawMessageSet.Types.Item.Builder builderForValue) {
result.item_[index] = builderForValue.Build();
return this;
}
public Builder AddItem(self::RawMessageSet.Types.Item value) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>();
}
result.item_.Add(value);
return this;
}
public Builder AddItem(self::RawMessageSet.Types.Item.Builder builderForValue) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>();
}
result.item_.Add(builderForValue.Build());
return this;
}
public Builder AddRangeItem(scg::IEnumerable<self::RawMessageSet.Types.Item> values) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>();
}
base.AddRange(values, result.item_);
return this;
}
public Builder ClearItem() {
result.item_ = pbc::Lists<self::RawMessageSet.Types.Item>.Empty;
return this;
}
}
}
#endregion
#region Services
#endregion
}