One-off patch to convert Unix line endings to Windows ones for generated source. Currently not sure why they ended up as Unix line endings after Git to Mercurial conversion, but we may need to tweak some repository settings.

pull/288/head
Jon Skeet 14 years ago
parent bf9821e074
commit 82bb0f1ef9
  1. 1922
      src/AddressBook/AddressBookProtos.cs
  2. 712
      src/ProtocolBuffers.Test/TestProtos/UnitTestCSharpOptionsProtoFile.cs
  3. 8092
      src/ProtocolBuffers.Test/TestProtos/UnitTestCustomOptionsProtoFile.cs
  4. 740
      src/ProtocolBuffers.Test/TestProtos/UnitTestEmbedOptimizeForProtoFile.cs
  5. 88
      src/ProtocolBuffers.Test/TestProtos/UnitTestEmptyProtoFile.cs
  6. 492
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  7. 560
      src/ProtocolBuffers.Test/TestProtos/UnitTestImportProtoFile.cs
  8. 2910
      src/ProtocolBuffers.Test/TestProtos/UnitTestMessageSetProtoFile.cs
  9. 764
      src/ProtocolBuffers.Test/TestProtos/UnitTestNoGenericServicesProtoFile.cs
  10. 1084
      src/ProtocolBuffers.Test/TestProtos/UnitTestOptimizeForProtoFile.cs
  11. 37246
      src/ProtocolBuffers.Test/TestProtos/UnitTestProtoFile.cs
  12. 1932
      src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
  13. 14044
      src/ProtocolBuffers/DescriptorProtos/DescriptorProtoFile.cs
  14. 3606
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestExtrasFullProtoFile.cs
  15. 492
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportLiteProtoFile.cs
  16. 560
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestImportProtoFile.cs
  17. 520
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteImportNonLiteProtoFile.cs
  18. 16324
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestLiteProtoFile.cs
  19. 37246
      src/ProtocolBuffersLite.Test/TestProtos/UnitTestProtoFile.cs

File diff suppressed because it is too large Load Diff

@ -1,356 +1,356 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestCSharpOptionsProtoFile { public static partial class UnitTestCSharpOptionsProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OptionsMessage__Descriptor; internal static pbd::MessageDescriptor internal__static_protobuf_unittest_OptionsMessage__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder> internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder> internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable;
#endregion #endregion
#region Descriptor #region Descriptor
public static pbd::FileDescriptor Descriptor { public static pbd::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbd::FileDescriptor descriptor; private static pbd::FileDescriptor descriptor;
static UnitTestCSharpOptionsProtoFile() { static UnitTestCSharpOptionsProtoFile() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
"Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" + "Ci1nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfY3NoYXJwX29wdGlvbnMucHJv" +
"dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" + "dG8SEXByb3RvYnVmX3VuaXR0ZXN0GiRnb29nbGUvcHJvdG9idWYvY3NoYXJw" +
"X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" + "X29wdGlvbnMucHJvdG8iXgoOT3B0aW9uc01lc3NhZ2USDgoGbm9ybWFsGAEg" +
"ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" + "ASgJEhcKD29wdGlvbnNfbWVzc2FnZRgCIAEoCRIjCgpjdXN0b21pemVkGAMg" +
"ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" + "ASgJQg/CPgwKCkN1c3RvbU5hbWVCRsI+QwohR29vZ2xlLlByb3RvY29sQnVm" +
"ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" + "ZmVycy5UZXN0UHJvdG9zEh5Vbml0VGVzdENTaGFycE9wdGlvbnNQcm90b0Zp" +
"bGU="); "bGU=");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root; descriptor = root;
internal__static_protobuf_unittest_OptionsMessage__Descriptor = Descriptor.MessageTypes[0]; internal__static_protobuf_unittest_OptionsMessage__Descriptor = Descriptor.MessageTypes[0];
internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable = internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder>(internal__static_protobuf_unittest_OptionsMessage__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.OptionsMessage, global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Builder>(internal__static_protobuf_unittest_OptionsMessage__Descriptor,
new string[] { "Normal", "OptionsMessage_", "CustomName", }); new string[] { "Normal", "OptionsMessage_", "CustomName", });
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry); RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
return registry; return registry;
}; };
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] { new pbd::FileDescriptor[] {
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
}, assigner); }, assigner);
} }
#endregion #endregion
} }
#region Messages #region Messages
public sealed partial class OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> { public sealed partial class OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> {
private static readonly OptionsMessage defaultInstance = new Builder().BuildPartial(); private static readonly OptionsMessage defaultInstance = new Builder().BuildPartial();
public static OptionsMessage DefaultInstance { public static OptionsMessage DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override OptionsMessage DefaultInstanceForType { public override OptionsMessage DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override OptionsMessage ThisMessage { protected override OptionsMessage ThisMessage {
get { return this; } get { return this; }
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable<OptionsMessage, OptionsMessage.Builder> InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable<OptionsMessage, OptionsMessage.Builder> InternalFieldAccessors {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.internal__static_protobuf_unittest_OptionsMessage__FieldAccessorTable; }
} }
public const int NormalFieldNumber = 1; public const int NormalFieldNumber = 1;
private bool hasNormal; private bool hasNormal;
private string normal_ = ""; private string normal_ = "";
public bool HasNormal { public bool HasNormal {
get { return hasNormal; } get { return hasNormal; }
} }
public string Normal { public string Normal {
get { return normal_; } get { return normal_; }
} }
public const int OptionsMessage_FieldNumber = 2; public const int OptionsMessage_FieldNumber = 2;
private bool hasOptionsMessage_; private bool hasOptionsMessage_;
private string optionsMessage_ = ""; private string optionsMessage_ = "";
public bool HasOptionsMessage_ { public bool HasOptionsMessage_ {
get { return hasOptionsMessage_; } get { return hasOptionsMessage_; }
} }
public string OptionsMessage_ { public string OptionsMessage_ {
get { return optionsMessage_; } get { return optionsMessage_; }
} }
public const int CustomNameFieldNumber = 3; public const int CustomNameFieldNumber = 3;
private bool hasCustomName; private bool hasCustomName;
private string customized_ = ""; private string customized_ = "";
public bool HasCustomName { public bool HasCustomName {
get { return hasCustomName; } get { return hasCustomName; }
} }
public string CustomName { public string CustomName {
get { return customized_; } get { return customized_; }
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
if (HasNormal) { if (HasNormal) {
output.WriteString(1, Normal); output.WriteString(1, Normal);
} }
if (HasOptionsMessage_) { if (HasOptionsMessage_) {
output.WriteString(2, OptionsMessage_); output.WriteString(2, OptionsMessage_);
} }
if (HasCustomName) { if (HasCustomName) {
output.WriteString(3, CustomName); output.WriteString(3, CustomName);
} }
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasNormal) { if (HasNormal) {
size += pb::CodedOutputStream.ComputeStringSize(1, Normal); size += pb::CodedOutputStream.ComputeStringSize(1, Normal);
} }
if (HasOptionsMessage_) { if (HasOptionsMessage_) {
size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_); size += pb::CodedOutputStream.ComputeStringSize(2, OptionsMessage_);
} }
if (HasCustomName) { if (HasCustomName) {
size += pb::CodedOutputStream.ComputeStringSize(3, CustomName); size += pb::CodedOutputStream.ComputeStringSize(3, CustomName);
} }
size += UnknownFields.SerializedSize; size += UnknownFields.SerializedSize;
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
public static OptionsMessage ParseFrom(pb::ByteString data) { public static OptionsMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static OptionsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static OptionsMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static OptionsMessage ParseFrom(byte[] data) { public static OptionsMessage ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static OptionsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static OptionsMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static OptionsMessage ParseFrom(global::System.IO.Stream input) { public static OptionsMessage ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static OptionsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static OptionsMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input) { public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static OptionsMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static OptionsMessage ParseFrom(pb::CodedInputStream input) { public static OptionsMessage ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static OptionsMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static OptionsMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(OptionsMessage prototype) { public static Builder CreateBuilder(OptionsMessage prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<OptionsMessage, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<OptionsMessage, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
OptionsMessage result = new OptionsMessage(); OptionsMessage result = new OptionsMessage();
protected override OptionsMessage MessageBeingBuilt { protected override OptionsMessage MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new OptionsMessage(); result = new OptionsMessage();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.Descriptor; }
} }
public override OptionsMessage DefaultInstanceForType { public override OptionsMessage DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance; }
} }
public override OptionsMessage BuildPartial() { public override OptionsMessage BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
OptionsMessage returnMe = result; OptionsMessage returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessage other) { public override Builder MergeFrom(pb::IMessage other) {
if (other is OptionsMessage) { if (other is OptionsMessage) {
return MergeFrom((OptionsMessage) other); return MergeFrom((OptionsMessage) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(OptionsMessage other) { public override Builder MergeFrom(OptionsMessage other) {
if (other == global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.OptionsMessage.DefaultInstance) return this;
if (other.HasNormal) { if (other.HasNormal) {
Normal = other.Normal; Normal = other.Normal;
} }
if (other.HasOptionsMessage_) { if (other.HasOptionsMessage_) {
OptionsMessage_ = other.OptionsMessage_; OptionsMessage_ = other.OptionsMessage_;
} }
if (other.HasCustomName) { if (other.HasCustomName) {
CustomName = other.CustomName; CustomName = other.CustomName;
} }
this.MergeUnknownFields(other.UnknownFields); this.MergeUnknownFields(other.UnknownFields);
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null; pb::UnknownFieldSet.Builder unknownFields = null;
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
if (unknownFields == null) { if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
} }
ParseUnknownField(input, unknownFields, extensionRegistry, tag); ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break; break;
} }
case 10: { case 10: {
Normal = input.ReadString(); Normal = input.ReadString();
break; break;
} }
case 18: { case 18: {
OptionsMessage_ = input.ReadString(); OptionsMessage_ = input.ReadString();
break; break;
} }
case 26: { case 26: {
CustomName = input.ReadString(); CustomName = input.ReadString();
break; break;
} }
} }
} }
} }
public bool HasNormal { public bool HasNormal {
get { return result.HasNormal; } get { return result.HasNormal; }
} }
public string Normal { public string Normal {
get { return result.Normal; } get { return result.Normal; }
set { SetNormal(value); } set { SetNormal(value); }
} }
public Builder SetNormal(string value) { public Builder SetNormal(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasNormal = true; result.hasNormal = true;
result.normal_ = value; result.normal_ = value;
return this; return this;
} }
public Builder ClearNormal() { public Builder ClearNormal() {
result.hasNormal = false; result.hasNormal = false;
result.normal_ = ""; result.normal_ = "";
return this; return this;
} }
public bool HasOptionsMessage_ { public bool HasOptionsMessage_ {
get { return result.HasOptionsMessage_; } get { return result.HasOptionsMessage_; }
} }
public string OptionsMessage_ { public string OptionsMessage_ {
get { return result.OptionsMessage_; } get { return result.OptionsMessage_; }
set { SetOptionsMessage_(value); } set { SetOptionsMessage_(value); }
} }
public Builder SetOptionsMessage_(string value) { public Builder SetOptionsMessage_(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasOptionsMessage_ = true; result.hasOptionsMessage_ = true;
result.optionsMessage_ = value; result.optionsMessage_ = value;
return this; return this;
} }
public Builder ClearOptionsMessage_() { public Builder ClearOptionsMessage_() {
result.hasOptionsMessage_ = false; result.hasOptionsMessage_ = false;
result.optionsMessage_ = ""; result.optionsMessage_ = "";
return this; return this;
} }
public bool HasCustomName { public bool HasCustomName {
get { return result.HasCustomName; } get { return result.HasCustomName; }
} }
public string CustomName { public string CustomName {
get { return result.CustomName; } get { return result.CustomName; }
set { SetCustomName(value); } set { SetCustomName(value); }
} }
public Builder SetCustomName(string value) { public Builder SetCustomName(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasCustomName = true; result.hasCustomName = true;
result.customized_ = value; result.customized_ = value;
return this; return this;
} }
public Builder ClearCustomName() { public Builder ClearCustomName() {
result.hasCustomName = false; result.hasCustomName = false;
result.customized_ = ""; result.customized_ = "";
return this; return this;
} }
} }
static OptionsMessage() { static OptionsMessage() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestCSharpOptionsProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
} }

@ -1,370 +1,370 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestEmbedOptimizeForProtoFile { public static partial class UnitTestEmbedOptimizeForProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor; internal static pbd::MessageDescriptor internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder> internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder> internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable;
#endregion #endregion
#region Descriptor #region Descriptor
public static pbd::FileDescriptor Descriptor { public static pbd::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbd::FileDescriptor descriptor; private static pbd::FileDescriptor descriptor;
static UnitTestEmbedOptimizeForProtoFile() { static UnitTestEmbedOptimizeForProtoFile() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
"CjFnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1iZWRfb3B0aW1pemVfZm9y" + "CjFnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1iZWRfb3B0aW1pemVfZm9y" +
"LnByb3RvEhFwcm90b2J1Zl91bml0dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2Nz" + "LnByb3RvEhFwcm90b2J1Zl91bml0dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2Nz" +
"aGFycF9vcHRpb25zLnByb3RvGitnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rf" + "aGFycF9vcHRpb25zLnByb3RvGitnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rf" +
"b3B0aW1pemVfZm9yLnByb3RvIqEBChlUZXN0RW1iZWRPcHRpbWl6ZWRGb3JT" + "b3B0aW1pemVfZm9yLnByb3RvIqEBChlUZXN0RW1iZWRPcHRpbWl6ZWRGb3JT" +
"aXplEkEKEG9wdGlvbmFsX21lc3NhZ2UYASABKAsyJy5wcm90b2J1Zl91bml0" + "aXplEkEKEG9wdGlvbmFsX21lc3NhZ2UYASABKAsyJy5wcm90b2J1Zl91bml0" +
"dGVzdC5UZXN0T3B0aW1pemVkRm9yU2l6ZRJBChByZXBlYXRlZF9tZXNzYWdl" + "dGVzdC5UZXN0T3B0aW1pemVkRm9yU2l6ZRJBChByZXBlYXRlZF9tZXNzYWdl" +
"GAIgAygLMicucHJvdG9idWZfdW5pdHRlc3QuVGVzdE9wdGltaXplZEZvclNp" + "GAIgAygLMicucHJvdG9idWZfdW5pdHRlc3QuVGVzdE9wdGltaXplZEZvclNp" +
"emVCS0gBwj5GCiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MS" + "emVCS0gBwj5GCiFHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MS" +
"IVVuaXRUZXN0RW1iZWRPcHRpbWl6ZUZvclByb3RvRmlsZQ=="); "IVVuaXRUZXN0RW1iZWRPcHRpbWl6ZUZvclByb3RvRmlsZQ==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root; descriptor = root;
internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor = Descriptor.MessageTypes[0]; internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor = Descriptor.MessageTypes[0];
internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable = internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder>(internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder>(internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor,
new string[] { "OptionalMessage", "RepeatedMessage", }); new string[] { "OptionalMessage", "RepeatedMessage", });
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry); RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.RegisterAllExtensions(registry); global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.RegisterAllExtensions(registry);
return registry; return registry;
}; };
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] { new pbd::FileDescriptor[] {
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.Descriptor, global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.Descriptor,
}, assigner); }, assigner);
} }
#endregion #endregion
} }
#region Messages #region Messages
public sealed partial class TestEmbedOptimizedForSize : pb::GeneratedMessage<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> { public sealed partial class TestEmbedOptimizedForSize : pb::GeneratedMessage<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> {
private static readonly TestEmbedOptimizedForSize defaultInstance = new Builder().BuildPartial(); private static readonly TestEmbedOptimizedForSize defaultInstance = new Builder().BuildPartial();
public static TestEmbedOptimizedForSize DefaultInstance { public static TestEmbedOptimizedForSize DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override TestEmbedOptimizedForSize DefaultInstanceForType { public override TestEmbedOptimizedForSize DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override TestEmbedOptimizedForSize ThisMessage { protected override TestEmbedOptimizedForSize ThisMessage {
get { return this; } get { return this; }
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> InternalFieldAccessors {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; }
} }
public const int OptionalMessageFieldNumber = 1; public const int OptionalMessageFieldNumber = 1;
private bool hasOptionalMessage; private bool hasOptionalMessage;
private global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; private global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance;
public bool HasOptionalMessage { public bool HasOptionalMessage {
get { return hasOptionalMessage; } get { return hasOptionalMessage; }
} }
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage { public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage {
get { return optionalMessage_; } get { return optionalMessage_; }
} }
public const int RepeatedMessageFieldNumber = 2; public const int RepeatedMessageFieldNumber = 2;
private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> repeatedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>(); private pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> repeatedMessage_ = new pbc::PopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList { public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList {
get { return repeatedMessage_; } get { return repeatedMessage_; }
} }
public int RepeatedMessageCount { public int RepeatedMessageCount {
get { return repeatedMessage_.Count; } get { return repeatedMessage_.Count; }
} }
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) { public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) {
return repeatedMessage_[index]; return repeatedMessage_[index];
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
if (HasOptionalMessage) { if (HasOptionalMessage) {
if (!OptionalMessage.IsInitialized) return false; if (!OptionalMessage.IsInitialized) return false;
} }
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) {
if (!element.IsInitialized) return false; if (!element.IsInitialized) return false;
} }
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
if (HasOptionalMessage) { if (HasOptionalMessage) {
output.WriteMessage(1, OptionalMessage); output.WriteMessage(1, OptionalMessage);
} }
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) {
output.WriteMessage(2, element); output.WriteMessage(2, element);
} }
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasOptionalMessage) { if (HasOptionalMessage) {
size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage); size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage);
} }
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) { foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) {
size += pb::CodedOutputStream.ComputeMessageSize(2, element); size += pb::CodedOutputStream.ComputeMessageSize(2, element);
} }
size += UnknownFields.SerializedSize; size += UnknownFields.SerializedSize;
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) { public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static TestEmbedOptimizedForSize ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseFrom(byte[] data) { public static TestEmbedOptimizedForSize ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static TestEmbedOptimizedForSize ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input) { public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input) { public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static TestEmbedOptimizedForSize ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input) { public static TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(TestEmbedOptimizedForSize prototype) { public static Builder CreateBuilder(TestEmbedOptimizedForSize prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<TestEmbedOptimizedForSize, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<TestEmbedOptimizedForSize, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
TestEmbedOptimizedForSize result = new TestEmbedOptimizedForSize(); TestEmbedOptimizedForSize result = new TestEmbedOptimizedForSize();
protected override TestEmbedOptimizedForSize MessageBeingBuilt { protected override TestEmbedOptimizedForSize MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new TestEmbedOptimizedForSize(); result = new TestEmbedOptimizedForSize();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Descriptor; }
} }
public override TestEmbedOptimizedForSize DefaultInstanceForType { public override TestEmbedOptimizedForSize DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance; }
} }
public override TestEmbedOptimizedForSize BuildPartial() { public override TestEmbedOptimizedForSize BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
result.repeatedMessage_.MakeReadOnly(); result.repeatedMessage_.MakeReadOnly();
TestEmbedOptimizedForSize returnMe = result; TestEmbedOptimizedForSize returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessage other) { public override Builder MergeFrom(pb::IMessage other) {
if (other is TestEmbedOptimizedForSize) { if (other is TestEmbedOptimizedForSize) {
return MergeFrom((TestEmbedOptimizedForSize) other); return MergeFrom((TestEmbedOptimizedForSize) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(TestEmbedOptimizedForSize other) { public override Builder MergeFrom(TestEmbedOptimizedForSize other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance) return this;
if (other.HasOptionalMessage) { if (other.HasOptionalMessage) {
MergeOptionalMessage(other.OptionalMessage); MergeOptionalMessage(other.OptionalMessage);
} }
if (other.repeatedMessage_.Count != 0) { if (other.repeatedMessage_.Count != 0) {
base.AddRange(other.repeatedMessage_, result.repeatedMessage_); base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
} }
this.MergeUnknownFields(other.UnknownFields); this.MergeUnknownFields(other.UnknownFields);
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null; pb::UnknownFieldSet.Builder unknownFields = null;
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
if (unknownFields == null) { if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
} }
ParseUnknownField(input, unknownFields, extensionRegistry, tag); ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break; break;
} }
case 10: { case 10: {
global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(); global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder();
if (HasOptionalMessage) { if (HasOptionalMessage) {
subBuilder.MergeFrom(OptionalMessage); subBuilder.MergeFrom(OptionalMessage);
} }
input.ReadMessage(subBuilder, extensionRegistry); input.ReadMessage(subBuilder, extensionRegistry);
OptionalMessage = subBuilder.BuildPartial(); OptionalMessage = subBuilder.BuildPartial();
break; break;
} }
case 18: { case 18: {
global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(); global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder();
input.ReadMessage(subBuilder, extensionRegistry); input.ReadMessage(subBuilder, extensionRegistry);
AddRepeatedMessage(subBuilder.BuildPartial()); AddRepeatedMessage(subBuilder.BuildPartial());
break; break;
} }
} }
} }
} }
public bool HasOptionalMessage { public bool HasOptionalMessage {
get { return result.HasOptionalMessage; } get { return result.HasOptionalMessage; }
} }
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage { public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage {
get { return result.OptionalMessage; } get { return result.OptionalMessage; }
set { SetOptionalMessage(value); } set { SetOptionalMessage(value); }
} }
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasOptionalMessage = true; result.hasOptionalMessage = true;
result.optionalMessage_ = value; result.optionalMessage_ = value;
return this; return this;
} }
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.hasOptionalMessage = true; result.hasOptionalMessage = true;
result.optionalMessage_ = builderForValue.Build(); result.optionalMessage_ = builderForValue.Build();
return this; return this;
} }
public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
if (result.HasOptionalMessage && if (result.HasOptionalMessage &&
result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance) { result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance) {
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial(); result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial();
} else { } else {
result.optionalMessage_ = value; result.optionalMessage_ = value;
} }
result.hasOptionalMessage = true; result.hasOptionalMessage = true;
return this; return this;
} }
public Builder ClearOptionalMessage() { public Builder ClearOptionalMessage() {
result.hasOptionalMessage = false; result.hasOptionalMessage = false;
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance;
return this; return this;
} }
public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList { public pbc::IPopsicleList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList {
get { return result.repeatedMessage_; } get { return result.repeatedMessage_; }
} }
public int RepeatedMessageCount { public int RepeatedMessageCount {
get { return result.RepeatedMessageCount; } get { return result.RepeatedMessageCount; }
} }
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) { public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) {
return result.GetRepeatedMessage(index); return result.GetRepeatedMessage(index);
} }
public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
result.repeatedMessage_[index] = value; result.repeatedMessage_[index] = value;
return this; return this;
} }
public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.repeatedMessage_[index] = builderForValue.Build(); result.repeatedMessage_[index] = builderForValue.Build();
return this; return this;
} }
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) { public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
result.repeatedMessage_.Add(value); result.repeatedMessage_.Add(value);
return this; return this;
} }
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) { public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.repeatedMessage_.Add(builderForValue.Build()); result.repeatedMessage_.Add(builderForValue.Build());
return this; return this;
} }
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) { public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) {
base.AddRange(values, result.repeatedMessage_); base.AddRange(values, result.repeatedMessage_);
return this; return this;
} }
public Builder ClearRepeatedMessage() { public Builder ClearRepeatedMessage() {
result.repeatedMessage_.Clear(); result.repeatedMessage_.Clear();
return this; return this;
} }
} }
static TestEmbedOptimizedForSize() { static TestEmbedOptimizedForSize() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
} }

@ -1,44 +1,44 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestEmptyProtoFile { public static partial class UnitTestEmptyProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
#endregion #endregion
#region Descriptor #region Descriptor
public static pbd::FileDescriptor Descriptor { public static pbd::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbd::FileDescriptor descriptor; private static pbd::FileDescriptor descriptor;
static UnitTestEmptyProtoFile() { static UnitTestEmptyProtoFile() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
"CiRnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1wdHkucHJvdG8aJGdvb2ds" + "CiRnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfZW1wdHkucHJvdG8aJGdvb2ds" +
"ZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5wcm90b0I+wj47CiFHb29nbGUu" + "ZS9wcm90b2J1Zi9jc2hhcnBfb3B0aW9ucy5wcm90b0I+wj47CiFHb29nbGUu" +
"UHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSFlVuaXRUZXN0RW1wdHlQcm90" + "UHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90b3MSFlVuaXRUZXN0RW1wdHlQcm90" +
"b0ZpbGU="); "b0ZpbGU=");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root; descriptor = root;
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry); RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
return registry; return registry;
}; };
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] { new pbd::FileDescriptor[] {
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
}, assigner); }, assigner);
} }
#endregion #endregion
} }
} }

@ -1,246 +1,246 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestImportLiteProtoFile { public static partial class UnitTestImportLiteProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
#endregion #endregion
#region Extensions #region Extensions
internal static readonly object Descriptor; internal static readonly object Descriptor;
static UnitTestImportLiteProtoFile() { static UnitTestImportLiteProtoFile() {
Descriptor = null; Descriptor = null;
} }
#endregion #endregion
} }
#region Enums #region Enums
public enum ImportEnumLite { public enum ImportEnumLite {
IMPORT_LITE_FOO = 7, IMPORT_LITE_FOO = 7,
IMPORT_LITE_BAR = 8, IMPORT_LITE_BAR = 8,
IMPORT_LITE_BAZ = 9, IMPORT_LITE_BAZ = 9,
} }
#endregion #endregion
#region Messages #region Messages
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> { public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> {
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial(); private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial();
public static ImportMessageLite DefaultInstance { public static ImportMessageLite DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override ImportMessageLite DefaultInstanceForType { public override ImportMessageLite DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override ImportMessageLite ThisMessage { protected override ImportMessageLite ThisMessage {
get { return this; } get { return this; }
} }
public const int DFieldNumber = 1; public const int DFieldNumber = 1;
private bool hasD; private bool hasD;
private int d_ = 0; private int d_ = 0;
public bool HasD { public bool HasD {
get { return hasD; } get { return hasD; }
} }
public int D { public int D {
get { return d_; } get { return d_; }
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
if (HasD) { if (HasD) {
output.WriteInt32(1, D); output.WriteInt32(1, D);
} }
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasD) { if (HasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D); size += pb::CodedOutputStream.ComputeInt32Size(1, D);
} }
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
if (hasD) hash ^= d_.GetHashCode(); if (hasD) hash ^= d_.GetHashCode();
return hash; return hash;
} }
public override bool Equals(object obj) { public override bool Equals(object obj) {
ImportMessageLite other = obj as ImportMessageLite; ImportMessageLite other = obj as ImportMessageLite;
if (other == null) return false; if (other == null) return false;
if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false; if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false;
return true; return true;
} }
public override void PrintTo(global::System.IO.TextWriter writer) { public override void PrintTo(global::System.IO.TextWriter writer) {
PrintField("d", hasD, d_, writer); PrintField("d", hasD, d_, writer);
} }
#endregion #endregion
public static ImportMessageLite ParseFrom(pb::ByteString data) { public static ImportMessageLite ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(byte[] data) { public static ImportMessageLite ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(global::System.IO.Stream input) { public static ImportMessageLite ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) { public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static ImportMessageLite ParseFrom(pb::CodedInputStream input) { public static ImportMessageLite ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(ImportMessageLite prototype) { public static Builder CreateBuilder(ImportMessageLite prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> { public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
ImportMessageLite result = new ImportMessageLite(); ImportMessageLite result = new ImportMessageLite();
protected override ImportMessageLite MessageBeingBuilt { protected override ImportMessageLite MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new ImportMessageLite(); result = new ImportMessageLite();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override ImportMessageLite DefaultInstanceForType { public override ImportMessageLite DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; }
} }
public override ImportMessageLite BuildPartial() { public override ImportMessageLite BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
ImportMessageLite returnMe = result; ImportMessageLite returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessageLite other) { public override Builder MergeFrom(pb::IMessageLite other) {
if (other is ImportMessageLite) { if (other is ImportMessageLite) {
return MergeFrom((ImportMessageLite) other); return MergeFrom((ImportMessageLite) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(ImportMessageLite other) { public override Builder MergeFrom(ImportMessageLite other) {
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this;
if (other.HasD) { if (other.HasD) {
D = other.D; D = other.D;
} }
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
return this; return this;
} }
ParseUnknownField(input, extensionRegistry, tag); ParseUnknownField(input, extensionRegistry, tag);
break; break;
} }
case 8: { case 8: {
D = input.ReadInt32(); D = input.ReadInt32();
break; break;
} }
} }
} }
} }
public bool HasD { public bool HasD {
get { return result.HasD; } get { return result.HasD; }
} }
public int D { public int D {
get { return result.D; } get { return result.D; }
set { SetD(value); } set { SetD(value); }
} }
public Builder SetD(int value) { public Builder SetD(int value) {
result.hasD = true; result.hasD = true;
result.d_ = value; result.d_ = value;
return this; return this;
} }
public Builder ClearD() { public Builder ClearD() {
result.hasD = false; result.hasD = false;
result.d_ = 0; result.d_ = 0;
return this; return this;
} }
} }
static ImportMessageLite() { static ImportMessageLite() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
} }

@ -1,280 +1,280 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestImportProtoFile { public static partial class UnitTestImportProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor; internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable;
#endregion #endregion
#region Descriptor #region Descriptor
public static pbd::FileDescriptor Descriptor { public static pbd::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbd::FileDescriptor descriptor; private static pbd::FileDescriptor descriptor;
static UnitTestImportProtoFile() { static UnitTestImportProtoFile() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
"CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" + "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" +
"b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" + "b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" +
"b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" + "b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" +
"SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" + "SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" +
"CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" + "CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" +
"PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" + "PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" +
"dEltcG9ydFByb3RvRmlsZQ=="); "dEltcG9ydFByb3RvRmlsZQ==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root; descriptor = root;
internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0]; internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0];
internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable = internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
new string[] { "D", }); new string[] { "D", });
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry); RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
return registry; return registry;
}; };
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] { new pbd::FileDescriptor[] {
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
}, assigner); }, assigner);
} }
#endregion #endregion
} }
#region Enums #region Enums
public enum ImportEnum { public enum ImportEnum {
IMPORT_FOO = 7, IMPORT_FOO = 7,
IMPORT_BAR = 8, IMPORT_BAR = 8,
IMPORT_BAZ = 9, IMPORT_BAZ = 9,
} }
#endregion #endregion
#region Messages #region Messages
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> { public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
private static readonly ImportMessage defaultInstance = new Builder().BuildPartial(); private static readonly ImportMessage defaultInstance = new Builder().BuildPartial();
public static ImportMessage DefaultInstance { public static ImportMessage DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override ImportMessage DefaultInstanceForType { public override ImportMessage DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override ImportMessage ThisMessage { protected override ImportMessage ThisMessage {
get { return this; } get { return this; }
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
} }
public const int DFieldNumber = 1; public const int DFieldNumber = 1;
private bool hasD; private bool hasD;
private int d_ = 0; private int d_ = 0;
public bool HasD { public bool HasD {
get { return hasD; } get { return hasD; }
} }
public int D { public int D {
get { return d_; } get { return d_; }
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
if (HasD) { if (HasD) {
output.WriteInt32(1, D); output.WriteInt32(1, D);
} }
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasD) { if (HasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D); size += pb::CodedOutputStream.ComputeInt32Size(1, D);
} }
size += UnknownFields.SerializedSize; size += UnknownFields.SerializedSize;
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
public static ImportMessage ParseFrom(pb::ByteString data) { public static ImportMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessage ParseFrom(byte[] data) { public static ImportMessage ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessage ParseFrom(global::System.IO.Stream input) { public static ImportMessage ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) { public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static ImportMessage ParseFrom(pb::CodedInputStream input) { public static ImportMessage ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(ImportMessage prototype) { public static Builder CreateBuilder(ImportMessage prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
ImportMessage result = new ImportMessage(); ImportMessage result = new ImportMessage();
protected override ImportMessage MessageBeingBuilt { protected override ImportMessage MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new ImportMessage(); result = new ImportMessage();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; }
} }
public override ImportMessage DefaultInstanceForType { public override ImportMessage DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
} }
public override ImportMessage BuildPartial() { public override ImportMessage BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
ImportMessage returnMe = result; ImportMessage returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessage other) { public override Builder MergeFrom(pb::IMessage other) {
if (other is ImportMessage) { if (other is ImportMessage) {
return MergeFrom((ImportMessage) other); return MergeFrom((ImportMessage) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(ImportMessage other) { public override Builder MergeFrom(ImportMessage other) {
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this;
if (other.HasD) { if (other.HasD) {
D = other.D; D = other.D;
} }
this.MergeUnknownFields(other.UnknownFields); this.MergeUnknownFields(other.UnknownFields);
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null; pb::UnknownFieldSet.Builder unknownFields = null;
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
if (unknownFields == null) { if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
} }
ParseUnknownField(input, unknownFields, extensionRegistry, tag); ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break; break;
} }
case 8: { case 8: {
D = input.ReadInt32(); D = input.ReadInt32();
break; break;
} }
} }
} }
} }
public bool HasD { public bool HasD {
get { return result.HasD; } get { return result.HasD; }
} }
public int D { public int D {
get { return result.D; } get { return result.D; }
set { SetD(value); } set { SetD(value); }
} }
public Builder SetD(int value) { public Builder SetD(int value) {
result.hasD = true; result.hasD = true;
result.d_ = value; result.d_ = value;
return this; return this;
} }
public Builder ClearD() { public Builder ClearD() {
result.hasD = false; result.hasD = false;
result.d_ = 0; result.d_ = 0;
return this; return this;
} }
} }
static ImportMessage() { static ImportMessage() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
} }

@ -1,382 +1,382 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos.NoGenericService { namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
public static partial class UnitTestNoGenericServicesProtoFile { public static partial class UnitTestNoGenericServicesProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
registry.Add(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension); registry.Add(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension);
} }
#endregion #endregion
#region Extensions #region Extensions
public const int TestExtensionFieldNumber = 1000; public const int TestExtensionFieldNumber = 1000;
public static pb::GeneratedExtensionBase<int> TestExtension; public static pb::GeneratedExtensionBase<int> TestExtension;
#endregion #endregion
#region Static variables #region Static variables
internal static pbd::MessageDescriptor internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; internal static pbd::MessageDescriptor internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder> internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder> internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable;
#endregion #endregion
#region Descriptor #region Descriptor
public static pbd::FileDescriptor Descriptor { public static pbd::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbd::FileDescriptor descriptor; private static pbd::FileDescriptor descriptor;
static UnitTestNoGenericServicesProtoFile() { static UnitTestNoGenericServicesProtoFile() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
"CjJnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfbm9fZ2VuZXJpY19zZXJ2aWNl" + "CjJnb29nbGUvcHJvdG9idWYvdW5pdHRlc3Rfbm9fZ2VuZXJpY19zZXJ2aWNl" +
"cy5wcm90bxIoZ29vZ2xlLnByb3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNf" + "cy5wcm90bxIoZ29vZ2xlLnByb3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNf" +
"dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9vcHRpb25zLnByb3RvIiMK" + "dGVzdBokZ29vZ2xlL3Byb3RvYnVmL2NzaGFycF9vcHRpb25zLnByb3RvIiMK" +
"C1Rlc3RNZXNzYWdlEgkKAWEYASABKAUqCQjoBxCAgICAAioTCghUZXN0RW51" + "C1Rlc3RNZXNzYWdlEgkKAWEYASABKAUqCQjoBxCAgICAAioTCghUZXN0RW51" +
"bRIHCgNGT08QATKCAQoLVGVzdFNlcnZpY2UScwoDRm9vEjUuZ29vZ2xlLnBy" + "bRIHCgNGT08QATKCAQoLVGVzdFNlcnZpY2UScwoDRm9vEjUuZ29vZ2xlLnBy" +
"b3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNfdGVzdC5UZXN0TWVzc2FnZRo1" + "b3RvYnVmLm5vX2dlbmVyaWNfc2VydmljZXNfdGVzdC5UZXN0TWVzc2FnZRo1" +
"Lmdvb2dsZS5wcm90b2J1Zi5ub19nZW5lcmljX3NlcnZpY2VzX3Rlc3QuVGVz" + "Lmdvb2dsZS5wcm90b2J1Zi5ub19nZW5lcmljX3NlcnZpY2VzX3Rlc3QuVGVz" +
"dE1lc3NhZ2U6TgoOdGVzdF9leHRlbnNpb24SNS5nb29nbGUucHJvdG9idWYu" + "dE1lc3NhZ2U6TgoOdGVzdF9leHRlbnNpb24SNS5nb29nbGUucHJvdG9idWYu" +
"bm9fZ2VuZXJpY19zZXJ2aWNlc190ZXN0LlRlc3RNZXNzYWdlGOgHIAEoBUJk" + "bm9fZ2VuZXJpY19zZXJ2aWNlc190ZXN0LlRlc3RNZXNzYWdlGOgHIAEoBUJk" +
"gAEAiAEAkAEAwj5YCjJHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90" + "gAEAiAEAkAEAwj5YCjJHb29nbGUuUHJvdG9jb2xCdWZmZXJzLlRlc3RQcm90" +
"b3MuTm9HZW5lcmljU2VydmljZRIiVW5pdFRlc3ROb0dlbmVyaWNTZXJ2aWNl" + "b3MuTm9HZW5lcmljU2VydmljZRIiVW5pdFRlc3ROb0dlbmVyaWNTZXJ2aWNl" +
"c1Byb3RvRmlsZQ=="); "c1Byb3RvRmlsZQ==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root; descriptor = root;
internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor = Descriptor.MessageTypes[0]; internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor = Descriptor.MessageTypes[0];
internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable = internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor,
new string[] { "A", }); new string[] { "A", });
global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor.Extensions[0]); global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.TestExtension = pb::GeneratedSingleExtension<int>.CreateInstance(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor.Extensions[0]);
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry); RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
return registry; return registry;
}; };
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] { new pbd::FileDescriptor[] {
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
}, assigner); }, assigner);
} }
#endregion #endregion
} }
#region Enums #region Enums
public enum TestEnum { public enum TestEnum {
FOO = 1, FOO = 1,
} }
#endregion #endregion
#region Messages #region Messages
public sealed partial class TestMessage : pb::ExtendableMessage<TestMessage, TestMessage.Builder> { public sealed partial class TestMessage : pb::ExtendableMessage<TestMessage, TestMessage.Builder> {
private static readonly TestMessage defaultInstance = new Builder().BuildPartial(); private static readonly TestMessage defaultInstance = new Builder().BuildPartial();
public static TestMessage DefaultInstance { public static TestMessage DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override TestMessage DefaultInstanceForType { public override TestMessage DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override TestMessage ThisMessage { protected override TestMessage ThisMessage {
get { return this; } get { return this; }
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable<TestMessage, TestMessage.Builder> InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable<TestMessage, TestMessage.Builder> InternalFieldAccessors {
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.internal__static_google_protobuf_no_generic_services_test_TestMessage__FieldAccessorTable; }
} }
public const int AFieldNumber = 1; public const int AFieldNumber = 1;
private bool hasA; private bool hasA;
private int a_ = 0; private int a_ = 0;
public bool HasA { public bool HasA {
get { return hasA; } get { return hasA; }
} }
public int A { public int A {
get { return a_; } get { return a_; }
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
if (!ExtensionsAreInitialized) return false; if (!ExtensionsAreInitialized) return false;
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this); pb::ExtendableMessage<TestMessage, TestMessage.Builder>.ExtensionWriter extensionWriter = CreateExtensionWriter(this);
if (HasA) { if (HasA) {
output.WriteInt32(1, A); output.WriteInt32(1, A);
} }
extensionWriter.WriteUntil(536870912, output); extensionWriter.WriteUntil(536870912, output);
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasA) { if (HasA) {
size += pb::CodedOutputStream.ComputeInt32Size(1, A); size += pb::CodedOutputStream.ComputeInt32Size(1, A);
} }
size += ExtensionsSerializedSize; size += ExtensionsSerializedSize;
size += UnknownFields.SerializedSize; size += UnknownFields.SerializedSize;
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
public static TestMessage ParseFrom(pb::ByteString data) { public static TestMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static TestMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static TestMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static TestMessage ParseFrom(byte[] data) { public static TestMessage ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static TestMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static TestMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static TestMessage ParseFrom(global::System.IO.Stream input) { public static TestMessage ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static TestMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static TestMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input) { public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static TestMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static TestMessage ParseFrom(pb::CodedInputStream input) { public static TestMessage ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static TestMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static TestMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(TestMessage prototype) { public static Builder CreateBuilder(TestMessage prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::ExtendableBuilder<TestMessage, Builder> { public sealed partial class Builder : pb::ExtendableBuilder<TestMessage, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
TestMessage result = new TestMessage(); TestMessage result = new TestMessage();
protected override TestMessage MessageBeingBuilt { protected override TestMessage MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new TestMessage(); result = new TestMessage();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Descriptor; }
} }
public override TestMessage DefaultInstanceForType { public override TestMessage DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; }
} }
public override TestMessage BuildPartial() { public override TestMessage BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
TestMessage returnMe = result; TestMessage returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessage other) { public override Builder MergeFrom(pb::IMessage other) {
if (other is TestMessage) { if (other is TestMessage) {
return MergeFrom((TestMessage) other); return MergeFrom((TestMessage) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(TestMessage other) { public override Builder MergeFrom(TestMessage other) {
if (other == global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance) return this;
if (other.HasA) { if (other.HasA) {
A = other.A; A = other.A;
} }
this.MergeExtensionFields(other); this.MergeExtensionFields(other);
this.MergeUnknownFields(other.UnknownFields); this.MergeUnknownFields(other.UnknownFields);
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null; pb::UnknownFieldSet.Builder unknownFields = null;
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
if (unknownFields == null) { if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
} }
ParseUnknownField(input, unknownFields, extensionRegistry, tag); ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break; break;
} }
case 8: { case 8: {
A = input.ReadInt32(); A = input.ReadInt32();
break; break;
} }
} }
} }
} }
public bool HasA { public bool HasA {
get { return result.HasA; } get { return result.HasA; }
} }
public int A { public int A {
get { return result.A; } get { return result.A; }
set { SetA(value); } set { SetA(value); }
} }
public Builder SetA(int value) { public Builder SetA(int value) {
result.hasA = true; result.hasA = true;
result.a_ = value; result.a_ = value;
return this; return this;
} }
public Builder ClearA() { public Builder ClearA() {
result.hasA = false; result.hasA = false;
result.a_ = 0; result.a_ = 0;
return this; return this;
} }
} }
static TestMessage() { static TestMessage() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.NoGenericService.UnitTestNoGenericServicesProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
#region Services #region Services
public abstract class TestService : pb::IService { public abstract class TestService : pb::IService {
public abstract void Foo( public abstract void Foo(
pb::IRpcController controller, pb::IRpcController controller,
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request,
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done); global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done);
public static pbd::ServiceDescriptor Descriptor { public static pbd::ServiceDescriptor Descriptor {
get { return UnitTestNoGenericServicesProtoFile.Descriptor.Services[0]; } get { return UnitTestNoGenericServicesProtoFile.Descriptor.Services[0]; }
} }
public pbd::ServiceDescriptor DescriptorForType { public pbd::ServiceDescriptor DescriptorForType {
get { return Descriptor; } get { return Descriptor; }
} }
public void CallMethod( public void CallMethod(
pbd::MethodDescriptor method, pbd::MethodDescriptor method,
pb::IRpcController controller, pb::IRpcController controller,
pb::IMessage request, pb::IMessage request,
global::System.Action<pb::IMessage> done) { global::System.Action<pb::IMessage> done) {
if (method.Service != Descriptor) { if (method.Service != Descriptor) {
throw new global::System.ArgumentException( throw new global::System.ArgumentException(
"Service.CallMethod() given method descriptor for wrong service type."); "Service.CallMethod() given method descriptor for wrong service type.");
} }
switch(method.Index) { switch(method.Index) {
case 0: case 0:
this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage) request, this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage) request,
pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage>( pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage>(
done)); done));
return; return;
default: default:
throw new global::System.InvalidOperationException("Can't get here."); throw new global::System.InvalidOperationException("Can't get here.");
} }
} }
public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) { public pb::IMessage GetRequestPrototype(pbd::MethodDescriptor method) {
if (method.Service != Descriptor) { if (method.Service != Descriptor) {
throw new global::System.ArgumentException( throw new global::System.ArgumentException(
"Service.GetRequestPrototype() given method descriptor for wrong service type."); "Service.GetRequestPrototype() given method descriptor for wrong service type.");
} }
switch(method.Index) { switch(method.Index) {
case 0: case 0:
return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance;
default: default:
throw new global::System.InvalidOperationException("Can't get here."); throw new global::System.InvalidOperationException("Can't get here.");
} }
} }
public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) { public pb::IMessage GetResponsePrototype(pbd::MethodDescriptor method) {
if (method.Service != Descriptor) { if (method.Service != Descriptor) {
throw new global::System.ArgumentException( throw new global::System.ArgumentException(
"Service.GetResponsePrototype() given method descriptor for wrong service type."); "Service.GetResponsePrototype() given method descriptor for wrong service type.");
} }
switch(method.Index) { switch(method.Index) {
case 0: case 0:
return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance; return global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance;
default: default:
throw new global::System.InvalidOperationException("Can't get here."); throw new global::System.InvalidOperationException("Can't get here.");
} }
} }
public static Stub CreateStub(pb::IRpcChannel channel) { public static Stub CreateStub(pb::IRpcChannel channel) {
return new Stub(channel); return new Stub(channel);
} }
public class Stub : global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestService { public class Stub : global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestService {
internal Stub(pb::IRpcChannel channel) { internal Stub(pb::IRpcChannel channel) {
this.channel = channel; this.channel = channel;
} }
private readonly pb::IRpcChannel channel; private readonly pb::IRpcChannel channel;
public pb::IRpcChannel Channel { public pb::IRpcChannel Channel {
get { return channel; } get { return channel; }
} }
public override void Foo( public override void Foo(
pb::IRpcController controller, pb::IRpcController controller,
global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage request,
global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done) { global::System.Action<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage> done) {
channel.CallMethod(Descriptor.Methods[0], channel.CallMethod(Descriptor.Methods[0],
controller, request, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance, controller, request, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance,
pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(done, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance)); pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.Builder>(done, global::Google.ProtocolBuffers.TestProtos.NoGenericService.TestMessage.DefaultInstance));
} }
} }
} }
#endregion #endregion
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,246 +1,246 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestImportLiteProtoFile { public static partial class UnitTestImportLiteProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
#endregion #endregion
#region Extensions #region Extensions
internal static readonly object Descriptor; internal static readonly object Descriptor;
static UnitTestImportLiteProtoFile() { static UnitTestImportLiteProtoFile() {
Descriptor = null; Descriptor = null;
} }
#endregion #endregion
} }
#region Enums #region Enums
public enum ImportEnumLite { public enum ImportEnumLite {
IMPORT_LITE_FOO = 7, IMPORT_LITE_FOO = 7,
IMPORT_LITE_BAR = 8, IMPORT_LITE_BAR = 8,
IMPORT_LITE_BAZ = 9, IMPORT_LITE_BAZ = 9,
} }
#endregion #endregion
#region Messages #region Messages
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> { public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> {
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial(); private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial();
public static ImportMessageLite DefaultInstance { public static ImportMessageLite DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override ImportMessageLite DefaultInstanceForType { public override ImportMessageLite DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override ImportMessageLite ThisMessage { protected override ImportMessageLite ThisMessage {
get { return this; } get { return this; }
} }
public const int DFieldNumber = 1; public const int DFieldNumber = 1;
private bool hasD; private bool hasD;
private int d_ = 0; private int d_ = 0;
public bool HasD { public bool HasD {
get { return hasD; } get { return hasD; }
} }
public int D { public int D {
get { return d_; } get { return d_; }
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
if (HasD) { if (HasD) {
output.WriteInt32(1, D); output.WriteInt32(1, D);
} }
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasD) { if (HasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D); size += pb::CodedOutputStream.ComputeInt32Size(1, D);
} }
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
if (hasD) hash ^= d_.GetHashCode(); if (hasD) hash ^= d_.GetHashCode();
return hash; return hash;
} }
public override bool Equals(object obj) { public override bool Equals(object obj) {
ImportMessageLite other = obj as ImportMessageLite; ImportMessageLite other = obj as ImportMessageLite;
if (other == null) return false; if (other == null) return false;
if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false; if (hasD != other.hasD || (hasD && !d_.Equals(other.d_))) return false;
return true; return true;
} }
public override void PrintTo(global::System.IO.TextWriter writer) { public override void PrintTo(global::System.IO.TextWriter writer) {
PrintField("d", hasD, d_, writer); PrintField("d", hasD, d_, writer);
} }
#endregion #endregion
public static ImportMessageLite ParseFrom(pb::ByteString data) { public static ImportMessageLite ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(byte[] data) { public static ImportMessageLite ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(global::System.IO.Stream input) { public static ImportMessageLite ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) { public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static ImportMessageLite ParseFrom(pb::CodedInputStream input) { public static ImportMessageLite ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessageLite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessageLite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(ImportMessageLite prototype) { public static Builder CreateBuilder(ImportMessageLite prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> { public sealed partial class Builder : pb::GeneratedBuilderLite<ImportMessageLite, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
ImportMessageLite result = new ImportMessageLite(); ImportMessageLite result = new ImportMessageLite();
protected override ImportMessageLite MessageBeingBuilt { protected override ImportMessageLite MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new ImportMessageLite(); result = new ImportMessageLite();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override ImportMessageLite DefaultInstanceForType { public override ImportMessageLite DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance; }
} }
public override ImportMessageLite BuildPartial() { public override ImportMessageLite BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
ImportMessageLite returnMe = result; ImportMessageLite returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessageLite other) { public override Builder MergeFrom(pb::IMessageLite other) {
if (other is ImportMessageLite) { if (other is ImportMessageLite) {
return MergeFrom((ImportMessageLite) other); return MergeFrom((ImportMessageLite) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(ImportMessageLite other) { public override Builder MergeFrom(ImportMessageLite other) {
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessageLite.DefaultInstance) return this;
if (other.HasD) { if (other.HasD) {
D = other.D; D = other.D;
} }
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
return this; return this;
} }
ParseUnknownField(input, extensionRegistry, tag); ParseUnknownField(input, extensionRegistry, tag);
break; break;
} }
case 8: { case 8: {
D = input.ReadInt32(); D = input.ReadInt32();
break; break;
} }
} }
} }
} }
public bool HasD { public bool HasD {
get { return result.HasD; } get { return result.HasD; }
} }
public int D { public int D {
get { return result.D; } get { return result.D; }
set { SetD(value); } set { SetD(value); }
} }
public Builder SetD(int value) { public Builder SetD(int value) {
result.hasD = true; result.hasD = true;
result.d_ = value; result.d_ = value;
return this; return this;
} }
public Builder ClearD() { public Builder ClearD() {
result.hasD = false; result.hasD = false;
result.d_ = 0; result.d_ = 0;
return this; return this;
} }
} }
static ImportMessageLite() { static ImportMessageLite() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportLiteProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
} }

@ -1,280 +1,280 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestImportProtoFile { public static partial class UnitTestImportProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor; internal static pbd::MessageDescriptor internal__static_protobuf_unittest_import_ImportMessage__Descriptor;
internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; internal static pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder> internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable;
#endregion #endregion
#region Descriptor #region Descriptor
public static pbd::FileDescriptor Descriptor { public static pbd::FileDescriptor Descriptor {
get { return descriptor; } get { return descriptor; }
} }
private static pbd::FileDescriptor descriptor; private static pbd::FileDescriptor descriptor;
static UnitTestImportProtoFile() { static UnitTestImportProtoFile() {
byte[] descriptorData = global::System.Convert.FromBase64String( byte[] descriptorData = global::System.Convert.FromBase64String(
"CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" + "CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfaW1wb3J0LnByb3RvEhhwcm90" +
"b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" + "b2J1Zl91bml0dGVzdF9pbXBvcnQaJGdvb2dsZS9wcm90b2J1Zi9jc2hhcnBf" +
"b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" + "b3B0aW9ucy5wcm90byIaCg1JbXBvcnRNZXNzYWdlEgkKAWQYASABKAUqPAoK" +
"SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" + "SW1wb3J0RW51bRIOCgpJTVBPUlRfRk9PEAcSDgoKSU1QT1JUX0JBUhAIEg4K" +
"CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" + "CklNUE9SVF9CQVoQCUJbChhjb20uZ29vZ2xlLnByb3RvYnVmLnRlc3RIAcI+" +
"PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" + "PAohR29vZ2xlLlByb3RvY29sQnVmZmVycy5UZXN0UHJvdG9zEhdVbml0VGVz" +
"dEltcG9ydFByb3RvRmlsZQ=="); "dEltcG9ydFByb3RvRmlsZQ==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root; descriptor = root;
internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0]; internal__static_protobuf_unittest_import_ImportMessage__Descriptor = Descriptor.MessageTypes[0];
internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable = internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor, new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.TestProtos.ImportMessage, global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder>(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
new string[] { "D", }); new string[] { "D", });
pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance(); pb::ExtensionRegistry registry = pb::ExtensionRegistry.CreateInstance();
RegisterAllExtensions(registry); RegisterAllExtensions(registry);
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry); global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.RegisterAllExtensions(registry);
return registry; return registry;
}; };
pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData,
new pbd::FileDescriptor[] { new pbd::FileDescriptor[] {
global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor, global::Google.ProtocolBuffers.DescriptorProtos.CSharpOptions.Descriptor,
}, assigner); }, assigner);
} }
#endregion #endregion
} }
#region Enums #region Enums
public enum ImportEnum { public enum ImportEnum {
IMPORT_FOO = 7, IMPORT_FOO = 7,
IMPORT_BAR = 8, IMPORT_BAR = 8,
IMPORT_BAZ = 9, IMPORT_BAZ = 9,
} }
#endregion #endregion
#region Messages #region Messages
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> { public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
private static readonly ImportMessage defaultInstance = new Builder().BuildPartial(); private static readonly ImportMessage defaultInstance = new Builder().BuildPartial();
public static ImportMessage DefaultInstance { public static ImportMessage DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override ImportMessage DefaultInstanceForType { public override ImportMessage DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override ImportMessage ThisMessage { protected override ImportMessage ThisMessage {
get { return this; } get { return this; }
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable<ImportMessage, ImportMessage.Builder> InternalFieldAccessors {
get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
} }
public const int DFieldNumber = 1; public const int DFieldNumber = 1;
private bool hasD; private bool hasD;
private int d_ = 0; private int d_ = 0;
public bool HasD { public bool HasD {
get { return hasD; } get { return hasD; }
} }
public int D { public int D {
get { return d_; } get { return d_; }
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
if (HasD) { if (HasD) {
output.WriteInt32(1, D); output.WriteInt32(1, D);
} }
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasD) { if (HasD) {
size += pb::CodedOutputStream.ComputeInt32Size(1, D); size += pb::CodedOutputStream.ComputeInt32Size(1, D);
} }
size += UnknownFields.SerializedSize; size += UnknownFields.SerializedSize;
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
public static ImportMessage ParseFrom(pb::ByteString data) { public static ImportMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessage ParseFrom(byte[] data) { public static ImportMessage ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static ImportMessage ParseFrom(global::System.IO.Stream input) { public static ImportMessage ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) { public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static ImportMessage ParseFrom(pb::CodedInputStream input) { public static ImportMessage ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static ImportMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static ImportMessage ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(ImportMessage prototype) { public static Builder CreateBuilder(ImportMessage prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<ImportMessage, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
ImportMessage result = new ImportMessage(); ImportMessage result = new ImportMessage();
protected override ImportMessage MessageBeingBuilt { protected override ImportMessage MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new ImportMessage(); result = new ImportMessage();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; }
} }
public override ImportMessage DefaultInstanceForType { public override ImportMessage DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
} }
public override ImportMessage BuildPartial() { public override ImportMessage BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
ImportMessage returnMe = result; ImportMessage returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessage other) { public override Builder MergeFrom(pb::IMessage other) {
if (other is ImportMessage) { if (other is ImportMessage) {
return MergeFrom((ImportMessage) other); return MergeFrom((ImportMessage) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(ImportMessage other) { public override Builder MergeFrom(ImportMessage other) {
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this;
if (other.HasD) { if (other.HasD) {
D = other.D; D = other.D;
} }
this.MergeUnknownFields(other.UnknownFields); this.MergeUnknownFields(other.UnknownFields);
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
pb::UnknownFieldSet.Builder unknownFields = null; pb::UnknownFieldSet.Builder unknownFields = null;
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
if (unknownFields != null) { if (unknownFields != null) {
this.UnknownFields = unknownFields.Build(); this.UnknownFields = unknownFields.Build();
} }
return this; return this;
} }
if (unknownFields == null) { if (unknownFields == null) {
unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields); unknownFields = pb::UnknownFieldSet.CreateBuilder(this.UnknownFields);
} }
ParseUnknownField(input, unknownFields, extensionRegistry, tag); ParseUnknownField(input, unknownFields, extensionRegistry, tag);
break; break;
} }
case 8: { case 8: {
D = input.ReadInt32(); D = input.ReadInt32();
break; break;
} }
} }
} }
} }
public bool HasD { public bool HasD {
get { return result.HasD; } get { return result.HasD; }
} }
public int D { public int D {
get { return result.D; } get { return result.D; }
set { SetD(value); } set { SetD(value); }
} }
public Builder SetD(int value) { public Builder SetD(int value) {
result.hasD = true; result.hasD = true;
result.d_ = value; result.d_ = value;
return this; return this;
} }
public Builder ClearD() { public Builder ClearD() {
result.hasD = false; result.hasD = false;
result.d_ = 0; result.d_ = 0;
return this; return this;
} }
} }
static ImportMessage() { static ImportMessage() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
} }

@ -1,260 +1,260 @@
// Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT! // Generated by ProtoGen, Version=0.9.0.0, Culture=neutral, PublicKeyToken=8fd7408b07f8d2cd. DO NOT EDIT!
using pb = global::Google.ProtocolBuffers; using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections; using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors; using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic; using scg = global::System.Collections.Generic;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestLiteImportNonLiteProtoFile { public static partial class UnitTestLiteImportNonLiteProtoFile {
#region Extension registration #region Extension registration
public static void RegisterAllExtensions(pb::ExtensionRegistry registry) { public static void RegisterAllExtensions(pb::ExtensionRegistry registry) {
} }
#endregion #endregion
#region Static variables #region Static variables
#endregion #endregion
#region Extensions #region Extensions
internal static readonly object Descriptor; internal static readonly object Descriptor;
static UnitTestLiteImportNonLiteProtoFile() { static UnitTestLiteImportNonLiteProtoFile() {
Descriptor = null; Descriptor = null;
} }
#endregion #endregion
} }
#region Messages #region Messages
public sealed partial class TestLiteImportsNonlite : pb::GeneratedMessageLite<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> { public sealed partial class TestLiteImportsNonlite : pb::GeneratedMessageLite<TestLiteImportsNonlite, TestLiteImportsNonlite.Builder> {
private static readonly TestLiteImportsNonlite defaultInstance = new Builder().BuildPartial(); private static readonly TestLiteImportsNonlite defaultInstance = new Builder().BuildPartial();
public static TestLiteImportsNonlite DefaultInstance { public static TestLiteImportsNonlite DefaultInstance {
get { return defaultInstance; } get { return defaultInstance; }
} }
public override TestLiteImportsNonlite DefaultInstanceForType { public override TestLiteImportsNonlite DefaultInstanceForType {
get { return defaultInstance; } get { return defaultInstance; }
} }
protected override TestLiteImportsNonlite ThisMessage { protected override TestLiteImportsNonlite ThisMessage {
get { return this; } get { return this; }
} }
public const int MessageFieldNumber = 1; public const int MessageFieldNumber = 1;
private bool hasMessage; private bool hasMessage;
private global::Google.ProtocolBuffers.TestProtos.TestAllTypes message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; private global::Google.ProtocolBuffers.TestProtos.TestAllTypes message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance;
public bool HasMessage { public bool HasMessage {
get { return hasMessage; } get { return hasMessage; }
} }
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message {
get { return message_; } get { return message_; }
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
return true; return true;
} }
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
int size = SerializedSize; int size = SerializedSize;
if (HasMessage) { if (HasMessage) {
output.WriteMessage(1, Message); output.WriteMessage(1, Message);
} }
} }
private int memoizedSerializedSize = -1; private int memoizedSerializedSize = -1;
public override int SerializedSize { public override int SerializedSize {
get { get {
int size = memoizedSerializedSize; int size = memoizedSerializedSize;
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (HasMessage) { if (HasMessage) {
size += pb::CodedOutputStream.ComputeMessageSize(1, Message); size += pb::CodedOutputStream.ComputeMessageSize(1, Message);
} }
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
} }
} }
#region Lite runtime methods #region Lite runtime methods
public override int GetHashCode() { public override int GetHashCode() {
int hash = GetType().GetHashCode(); int hash = GetType().GetHashCode();
if (hasMessage) hash ^= message_.GetHashCode(); if (hasMessage) hash ^= message_.GetHashCode();
return hash; return hash;
} }
public override bool Equals(object obj) { public override bool Equals(object obj) {
TestLiteImportsNonlite other = obj as TestLiteImportsNonlite; TestLiteImportsNonlite other = obj as TestLiteImportsNonlite;
if (other == null) return false; if (other == null) return false;
if (hasMessage != other.hasMessage || (hasMessage && !message_.Equals(other.message_))) return false; if (hasMessage != other.hasMessage || (hasMessage && !message_.Equals(other.message_))) return false;
return true; return true;
} }
public override void PrintTo(global::System.IO.TextWriter writer) { public override void PrintTo(global::System.IO.TextWriter writer) {
PrintField("message", hasMessage, message_, writer); PrintField("message", hasMessage, message_, writer);
} }
#endregion #endregion
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data) { public static TestLiteImportsNonlite ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static TestLiteImportsNonlite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) { public static TestLiteImportsNonlite ParseFrom(pb::ByteString data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static TestLiteImportsNonlite ParseFrom(byte[] data) { public static TestLiteImportsNonlite ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static TestLiteImportsNonlite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) { public static TestLiteImportsNonlite ParseFrom(byte[] data, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)).BuildParsed();
} }
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input) { public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static TestLiteImportsNonlite ParseFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input) { public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input) {
return CreateBuilder().MergeDelimitedFrom(input).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input).BuildParsed();
} }
public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) { public static TestLiteImportsNonlite ParseDelimitedFrom(global::System.IO.Stream input, pb::ExtensionRegistry extensionRegistry) {
return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed(); return CreateBuilder().MergeDelimitedFrom(input, extensionRegistry).BuildParsed();
} }
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input) { public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public static TestLiteImportsNonlite ParseFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
} }
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); } public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(TestLiteImportsNonlite prototype) { public static Builder CreateBuilder(TestLiteImportsNonlite prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilderLite<TestLiteImportsNonlite, Builder> { public sealed partial class Builder : pb::GeneratedBuilderLite<TestLiteImportsNonlite, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
public Builder() {} public Builder() {}
TestLiteImportsNonlite result = new TestLiteImportsNonlite(); TestLiteImportsNonlite result = new TestLiteImportsNonlite();
protected override TestLiteImportsNonlite MessageBeingBuilt { protected override TestLiteImportsNonlite MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new TestLiteImportsNonlite(); result = new TestLiteImportsNonlite();
return this; return this;
} }
public override Builder Clone() { public override Builder Clone() {
return new Builder().MergeFrom(result); return new Builder().MergeFrom(result);
} }
public override TestLiteImportsNonlite DefaultInstanceForType { public override TestLiteImportsNonlite DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance; }
} }
public override TestLiteImportsNonlite BuildPartial() { public override TestLiteImportsNonlite BuildPartial() {
if (result == null) { if (result == null) {
throw new global::System.InvalidOperationException("build() has already been called on this Builder"); throw new global::System.InvalidOperationException("build() has already been called on this Builder");
} }
TestLiteImportsNonlite returnMe = result; TestLiteImportsNonlite returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
public override Builder MergeFrom(pb::IMessageLite other) { public override Builder MergeFrom(pb::IMessageLite other) {
if (other is TestLiteImportsNonlite) { if (other is TestLiteImportsNonlite) {
return MergeFrom((TestLiteImportsNonlite) other); return MergeFrom((TestLiteImportsNonlite) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(TestLiteImportsNonlite other) { public override Builder MergeFrom(TestLiteImportsNonlite other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.TestLiteImportsNonlite.DefaultInstance) return this;
if (other.HasMessage) { if (other.HasMessage) {
MergeMessage(other.Message); MergeMessage(other.Message);
} }
return this; return this;
} }
public override Builder MergeFrom(pb::CodedInputStream input) { public override Builder MergeFrom(pb::CodedInputStream input) {
return MergeFrom(input, pb::ExtensionRegistry.Empty); return MergeFrom(input, pb::ExtensionRegistry.Empty);
} }
public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) { public override Builder MergeFrom(pb::CodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
while (true) { while (true) {
uint tag = input.ReadTag(); uint tag = input.ReadTag();
switch (tag) { switch (tag) {
case 0: { case 0: {
return this; return this;
} }
default: { default: {
if (pb::WireFormat.IsEndGroupTag(tag)) { if (pb::WireFormat.IsEndGroupTag(tag)) {
return this; return this;
} }
ParseUnknownField(input, extensionRegistry, tag); ParseUnknownField(input, extensionRegistry, tag);
break; break;
} }
case 10: { case 10: {
global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(); global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder();
if (HasMessage) { if (HasMessage) {
subBuilder.MergeFrom(Message); subBuilder.MergeFrom(Message);
} }
input.ReadMessage(subBuilder, extensionRegistry); input.ReadMessage(subBuilder, extensionRegistry);
Message = subBuilder.BuildPartial(); Message = subBuilder.BuildPartial();
break; break;
} }
} }
} }
} }
public bool HasMessage { public bool HasMessage {
get { return result.HasMessage; } get { return result.HasMessage; }
} }
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message { public global::Google.ProtocolBuffers.TestProtos.TestAllTypes Message {
get { return result.Message; } get { return result.Message; }
set { SetMessage(value); } set { SetMessage(value); }
} }
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
result.hasMessage = true; result.hasMessage = true;
result.message_ = value; result.message_ = value;
return this; return this;
} }
public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) { public Builder SetMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue"); pb::ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
result.hasMessage = true; result.hasMessage = true;
result.message_ = builderForValue.Build(); result.message_ = builderForValue.Build();
return this; return this;
} }
public Builder MergeMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) { public Builder MergeMessage(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
pb::ThrowHelper.ThrowIfNull(value, "value"); pb::ThrowHelper.ThrowIfNull(value, "value");
if (result.HasMessage && if (result.HasMessage &&
result.message_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) { result.message_ != global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance) {
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.message_).MergeFrom(value).BuildPartial(); result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.CreateBuilder(result.message_).MergeFrom(value).BuildPartial();
} else { } else {
result.message_ = value; result.message_ = value;
} }
result.hasMessage = true; result.hasMessage = true;
return this; return this;
} }
public Builder ClearMessage() { public Builder ClearMessage() {
result.hasMessage = false; result.hasMessage = false;
result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance; result.message_ = global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance;
return this; return this;
} }
} }
static TestLiteImportsNonlite() { static TestLiteImportsNonlite() {
object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestLiteImportNonLiteProtoFile.Descriptor, null); object.ReferenceEquals(global::Google.ProtocolBuffers.TestProtos.UnitTestLiteImportNonLiteProtoFile.Descriptor, null);
} }
} }
#endregion #endregion
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save