Commit eb4ef52c authored by Jon Skeet's avatar Jon Skeet

Abandon the 'self' namespace alias - we need to be able to import types in other namespaces too.

parent 5407a432
...@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,8 +4,6 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public enum EnumWithNoOuter { public enum EnumWithNoOuter {
......
...@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,8 +4,6 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public sealed partial class MessageWithNoOuter : pb::GeneratedMessage<MessageWithNoOuter, MessageWithNoOuter.Builder> { public sealed partial class MessageWithNoOuter : pb::GeneratedMessage<MessageWithNoOuter, MessageWithNoOuter.Builder> {
...@@ -19,11 +17,11 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -19,11 +17,11 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter__FieldAccessorTable; }
} }
#region Nested types #region Nested types
...@@ -43,11 +41,11 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -43,11 +41,11 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.MultiFileProto.internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__FieldAccessorTable; }
} }
// optional int32 i = 1; // optional int32 i = 1;
...@@ -60,35 +58,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -60,35 +58,35 @@ namespace Google.ProtocolBuffers.TestProtos {
get { return i_; } get { return i_; }
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -96,26 +94,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -96,26 +94,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::MessageWithNoOuter.Types.NestedMessage prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::MessageWithNoOuter.Types.NestedMessage, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::MessageWithNoOuter.Types.NestedMessage.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.CreateBuilder()
internal Builder() {} internal Builder() {}
self::MessageWithNoOuter.Types.NestedMessage result = new self::MessageWithNoOuter.Types.NestedMessage(); global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage result = new global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage();
protected override self::MessageWithNoOuter.Types.NestedMessage MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::MessageWithNoOuter.Types.NestedMessage(); result = new global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage();
return this; return this;
} }
...@@ -124,15 +122,15 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -124,15 +122,15 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::MessageWithNoOuter.Types.NestedMessage.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.Descriptor; }
} }
public override self::MessageWithNoOuter.Types.NestedMessage DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage DefaultInstanceForType {
get { return self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.DefaultInstance; }
} }
public override self::MessageWithNoOuter.Types.NestedMessage BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage BuildPartial() {
self::MessageWithNoOuter.Types.NestedMessage returnMe = result; global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
...@@ -164,71 +162,71 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -164,71 +162,71 @@ namespace Google.ProtocolBuffers.TestProtos {
// optional .protobuf_unittest.MessageWithNoOuter.NestedMessage nested = 1; // optional .protobuf_unittest.MessageWithNoOuter.NestedMessage nested = 1;
private bool hasNested; private bool hasNested;
private self::MessageWithNoOuter.Types.NestedMessage nested_ = self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance; private global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage nested_ = global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.DefaultInstance;
public bool HasNested { public bool HasNested {
get { return hasNested; } get { return hasNested; }
} }
public self::MessageWithNoOuter.Types.NestedMessage Nested { public global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage Nested {
get { return nested_; } get { return nested_; }
} }
// repeated .protobuf_unittest.TestAllTypes foreign = 2; // repeated .protobuf_unittest.TestAllTypes foreign = 2;
private scg::IList<self::TestAllTypes> foreign_ = pbc::Lists<self::TestAllTypes>.Empty; private scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> foreign_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty;
public scg::IList<self::TestAllTypes> ForeignList { public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> ForeignList {
get { return foreign_; } get { return foreign_; }
} }
public int ForeignCount public int ForeignCount
{ get { return foreign_.Count; } { get { return foreign_.Count; }
} }
public self::TestAllTypes GetForeign(int index) { public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetForeign(int index) {
return foreign_ [index]; return foreign_ [index];
} }
// optional .protobuf_unittest.MessageWithNoOuter.NestedEnum nested_enum = 3; // optional .protobuf_unittest.MessageWithNoOuter.NestedEnum nested_enum = 3;
private bool hasNestedEnum; private bool hasNestedEnum;
private self::MessageWithNoOuter.Types.NestedEnum nestedEnum_ = self::MessageWithNoOuter.Types.NestedEnum.BAZ; private global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum nestedEnum_ = global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum.BAZ;
public bool HasNestedEnum { public bool HasNestedEnum {
get { return hasNestedEnum; } get { return hasNestedEnum; }
} }
public self::MessageWithNoOuter.Types.NestedEnum NestedEnum { get { return nestedEnum_; }} public global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum NestedEnum { get { return nestedEnum_; }}
// optional .protobuf_unittest.EnumWithNoOuter foreign_enum = 4; // optional .protobuf_unittest.EnumWithNoOuter foreign_enum = 4;
private bool hasForeignEnum; private bool hasForeignEnum;
private self::EnumWithNoOuter foreignEnum_ = self::EnumWithNoOuter.FOO; private global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter foreignEnum_ = global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter.FOO;
public bool HasForeignEnum { public bool HasForeignEnum {
get { return hasForeignEnum; } get { return hasForeignEnum; }
} }
public self::EnumWithNoOuter ForeignEnum { get { return foreignEnum_; }} public global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter ForeignEnum { get { return foreignEnum_; }}
public static self::MessageWithNoOuter ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::MessageWithNoOuter ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::MessageWithNoOuter ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::MessageWithNoOuter ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::MessageWithNoOuter ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::MessageWithNoOuter ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::MessageWithNoOuter ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::MessageWithNoOuter ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -236,26 +234,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -236,26 +234,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::MessageWithNoOuter prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::MessageWithNoOuter, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::MessageWithNoOuter.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.CreateBuilder()
internal Builder() {} internal Builder() {}
self::MessageWithNoOuter result = new self::MessageWithNoOuter(); global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter result = new global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter();
protected override self::MessageWithNoOuter MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::MessageWithNoOuter(); result = new global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter();
return this; return this;
} }
...@@ -264,18 +262,18 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -264,18 +262,18 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::MessageWithNoOuter.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Descriptor; }
} }
public override self::MessageWithNoOuter DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter DefaultInstanceForType {
get { return self::MessageWithNoOuter.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.DefaultInstance; }
} }
public override self::MessageWithNoOuter BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter BuildPartial() {
if (result.foreign_ != pbc::Lists<self::TestAllTypes>.Empty) { if (result.foreign_ != pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
result.foreign_ = pbc::Lists<self::TestAllTypes>.AsReadOnly(result.foreign_); result.foreign_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.AsReadOnly(result.foreign_);
} }
self::MessageWithNoOuter returnMe = result; global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
...@@ -285,25 +283,25 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -285,25 +283,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasNested { public bool HasNested {
get { return result.HasNested; } get { return result.HasNested; }
} }
public self::MessageWithNoOuter.Types.NestedMessage Nested { public global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage Nested {
get { return result.Nested; } get { return result.Nested; }
set { SetNested(value); } set { SetNested(value); }
} }
public Builder SetNested(self::MessageWithNoOuter.Types.NestedMessage value) { public Builder SetNested(global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage value) {
result.hasNested = true; result.hasNested = true;
result.nested_ = value; result.nested_ = value;
return this; return this;
} }
public Builder SetNested(self::MessageWithNoOuter.Types.NestedMessage.Builder builderForValue) { public Builder SetNested(global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.Builder builderForValue) {
result.hasNested = true; result.hasNested = true;
result.nested_ = builderForValue.Build(); result.nested_ = builderForValue.Build();
return this; return this;
} }
public Builder MergeNested(self::MessageWithNoOuter.Types.NestedMessage value) { public Builder MergeNested(global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage value) {
if (result.HasNested && if (result.HasNested &&
result.nested_ != self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance) { result.nested_ != global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.DefaultInstance) {
result.nested_ = result.nested_ =
self::MessageWithNoOuter.Types.NestedMessage.CreateBuilder(result.nested_).MergeFrom(value).BuildPartial(); global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.CreateBuilder(result.nested_).MergeFrom(value).BuildPartial();
} else { } else {
result.nested_ = value; result.nested_ = value;
} }
...@@ -312,51 +310,51 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -312,51 +310,51 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public Builder ClearNested() { public Builder ClearNested() {
result.hasNested = false; result.hasNested = false;
result.nested_ = self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance; result.nested_ = global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.DefaultInstance;
return this; return this;
} }
// repeated .protobuf_unittest.TestAllTypes foreign = 2; // repeated .protobuf_unittest.TestAllTypes foreign = 2;
public scg::IList<self::TestAllTypes> ForeignList { public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> ForeignList {
get { return pbc::Lists.AsReadOnly(result.foreign_); } get { return pbc::Lists.AsReadOnly(result.foreign_); }
} }
public int ForeignCount { public int ForeignCount {
get { return result.ForeignCount; } get { return result.ForeignCount; }
} }
public self::TestAllTypes GetForeign(int index) { public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetForeign(int index) {
return result.GetForeign(index); return result.GetForeign(index);
} }
public Builder SetForeign(int index, self::TestAllTypes value) { public Builder SetForeign(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
result.foreign_[index] = value; result.foreign_[index] = value;
return this; return this;
} }
public Builder SetForeign(int index, self::TestAllTypes.Builder builderForValue) { public Builder SetForeign(int index, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
result.foreign_[index] = builderForValue.Build(); result.foreign_[index] = builderForValue.Build();
return this; return this;
} }
public Builder AddForeign(self::TestAllTypes value) { public Builder AddForeign(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) { if (result.foreign_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
result.foreign_ = new scg::List<self::TestAllTypes>(); result.foreign_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
} }
result.foreign_.Add(value); result.foreign_.Add(value);
return this; return this;
} }
public Builder AddForeign(self::TestAllTypes.Builder builderForValue) { public Builder AddForeign(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) { if (result.foreign_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
result.foreign_ = new scg::List<self::TestAllTypes>(); result.foreign_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
} }
result.foreign_.Add(builderForValue.Build()); result.foreign_.Add(builderForValue.Build());
return this; return this;
} }
public Builder AddRangeForeign(scg::IEnumerable<self::TestAllTypes> values) { public Builder AddRangeForeign(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) { if (result.foreign_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
result.foreign_ = new scg::List<self::TestAllTypes>(); result.foreign_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
} }
base.AddRange(values, result.foreign_); base.AddRange(values, result.foreign_);
return this; return this;
} }
public Builder ClearForeign() { public Builder ClearForeign() {
result.foreign_ = pbc::Lists<self::TestAllTypes>.Empty; result.foreign_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty;
return this; return this;
} }
...@@ -364,18 +362,18 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -364,18 +362,18 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasNestedEnum { public bool HasNestedEnum {
get { return result.HasNestedEnum; } get { return result.HasNestedEnum; }
} }
public self::MessageWithNoOuter.Types.NestedEnum NestedEnum { public global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum NestedEnum {
get { return result.NestedEnum; } get { return result.NestedEnum; }
set { SetNestedEnum(value); } set { SetNestedEnum(value); }
} }
public Builder SetNestedEnum(self::MessageWithNoOuter.Types.NestedEnum value) { public Builder SetNestedEnum(global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum value) {
result.hasNestedEnum = true; result.hasNestedEnum = true;
result.nestedEnum_ = value; result.nestedEnum_ = value;
return this; return this;
} }
public Builder ClearNestedEnum() { public Builder ClearNestedEnum() {
result.hasNestedEnum = false; result.hasNestedEnum = false;
result.nestedEnum_ = self::MessageWithNoOuter.Types.NestedEnum.BAZ; result.nestedEnum_ = global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum.BAZ;
return this; return this;
} }
...@@ -383,18 +381,18 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -383,18 +381,18 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasForeignEnum { public bool HasForeignEnum {
get { return result.HasForeignEnum; } get { return result.HasForeignEnum; }
} }
public self::EnumWithNoOuter ForeignEnum { public global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter ForeignEnum {
get { return result.ForeignEnum; } get { return result.ForeignEnum; }
set { SetForeignEnum(value); } set { SetForeignEnum(value); }
} }
public Builder SetForeignEnum(self::EnumWithNoOuter value) { public Builder SetForeignEnum(global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter value) {
result.hasForeignEnum = true; result.hasForeignEnum = true;
result.foreignEnum_ = value; result.foreignEnum_ = value;
return this; return this;
} }
public Builder ClearForeignEnum() { public Builder ClearForeignEnum() {
result.hasForeignEnum = false; result.hasForeignEnum = false;
result.foreignEnum_ = self::EnumWithNoOuter.FOO; result.foreignEnum_ = global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter.FOO;
return this; return this;
} }
} }
......
...@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,8 +4,6 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class MultiFileProto { public static partial class MultiFileProto {
...@@ -54,7 +52,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -54,7 +52,7 @@ namespace Google.ProtocolBuffers.TestProtos {
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xca, 0x3e, 0x0e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0xca, 0x3e, 0x0e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x72,
0x6f, 0x74, 0x6f, 0xd0, 0x3e, 0x01, 0xd8, 0x3e, 0x00, 0xe0, 0x3e, 0x01, 0x6f, 0x74, 0x6f, 0xd0, 0x3e, 0x01, 0xd8, 0x3e, 0x00, 0xe0, 0x3e, 0x01,
}, new pbd::FileDescriptor[] { }, new pbd::FileDescriptor[] {
self::UnitTestProtoFile.Descriptor, global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor,
}); });
#endregion #endregion
...@@ -69,15 +67,15 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -69,15 +67,15 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor,
new string[] { "Nested", "Foreign", "NestedEnum", "ForeignEnum", }, new string[] { "Nested", "Foreign", "NestedEnum", "ForeignEnum", },
typeof (self::MessageWithNoOuter), typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter),
typeof (self::MessageWithNoOuter.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor
= internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor.NestedTypes[0]; = internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor.NestedTypes[0];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor,
new string[] { "I", }, new string[] { "I", },
typeof (self::MessageWithNoOuter.Types.NestedMessage), typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage),
typeof (self::MessageWithNoOuter.Types.NestedMessage.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.Builder));
#endregion #endregion
} }
......
...@@ -4,18 +4,16 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,18 +4,16 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public abstract class ServiceWithNoOuter : pb::IService { public abstract class ServiceWithNoOuter : pb::IService {
public abstract void Foo( public abstract void Foo(
pb::IRpcController controller, pb::IRpcController controller,
self::MessageWithNoOuter request, global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter request,
global::System.Action<self::TestAllTypes> done); global::System.Action<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> done);
public static pbd::ServiceDescriptor Descriptor { public static pbd::ServiceDescriptor Descriptor {
get { return self::MultiFileProto.Descriptor.Services[0]; } get { return global::Google.ProtocolBuffers.TestProtos.MultiFileProto.Descriptor.Services[0]; }
} }
public pbd::ServiceDescriptor DescriptorForType { public pbd::ServiceDescriptor DescriptorForType {
get { return Descriptor; } get { return Descriptor; }
...@@ -33,8 +31,8 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -33,8 +31,8 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
switch(method.Index) { switch(method.Index) {
case 0: case 0:
this.Foo(controller, (self::MessageWithNoOuter)request, this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter)request,
pb::RpcUtil.SpecializeCallback<self::TestAllTypes>( pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>(
done)); done));
return; return;
default: default:
...@@ -50,7 +48,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -50,7 +48,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
switch(method.Index) { switch(method.Index) {
case 0: case 0:
return self::MessageWithNoOuter.DefaultInstance; return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.DefaultInstance;
default: default:
throw new global::System.ArgumentException("Can't get here."); throw new global::System.ArgumentException("Can't get here.");
} }
...@@ -64,7 +62,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -64,7 +62,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
switch(method.Index) { switch(method.Index) {
case 0: case 0:
return self::TestAllTypes.DefaultInstance; return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance;
default: default:
throw new global::System.ArgumentException("Can't get here."); throw new global::System.ArgumentException("Can't get here.");
} }
...@@ -75,7 +73,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -75,7 +73,7 @@ namespace Google.ProtocolBuffers.TestProtos {
return new Stub(channel); return new Stub(channel);
} }
public class Stub : self::ServiceWithNoOuter { public class Stub : global::Google.ProtocolBuffers.TestProtos.ServiceWithNoOuter {
internal Stub(pb::IRpcChannel channel) { internal Stub(pb::IRpcChannel channel) {
this.channel = channel; this.channel = channel;
} }
...@@ -88,14 +86,14 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -88,14 +86,14 @@ namespace Google.ProtocolBuffers.TestProtos {
public override void Foo( public override void Foo(
pb::IRpcController controller, pb::IRpcController controller,
self::MessageWithNoOuter request, global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter request,
global::System.Action<self::TestAllTypes> done) { global::System.Action<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> done) {
channel.CallMethod( channel.CallMethod(
Descriptor.Methods[0], Descriptor.Methods[0],
controller, controller,
request, request,
self::TestAllTypes.DefaultInstance, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance,
pb::RpcUtil.GeneralizeCallback<self::TestAllTypes, self::TestAllTypes.Builder>(done, self::TestAllTypes.DefaultInstance)); pb::RpcUtil.GeneralizeCallback<global::Google.ProtocolBuffers.TestProtos.TestAllTypes, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder>(done, global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance));
} }
} }
} }
......
...@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,8 +4,6 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestEmbedOptimizeForProtoFile { public static partial class UnitTestEmbedOptimizeForProtoFile {
...@@ -35,7 +33,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -35,7 +33,7 @@ namespace Google.ProtocolBuffers.TestProtos {
0x3e, 0x21, 0x55, 0x6e, 0x69, 0x74, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x3e, 0x21, 0x55, 0x6e, 0x69, 0x74, 0x54, 0x65, 0x73, 0x74, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6d,
0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65,
}, new pbd::FileDescriptor[] { }, new pbd::FileDescriptor[] {
self::UnitTestOptimizeForProtoFile.Descriptor, global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.Descriptor,
}); });
#endregion #endregion
...@@ -48,8 +46,8 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -48,8 +46,8 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor,
new string[] { "OptionalMessage", "RepeatedMessage", }, new string[] { "OptionalMessage", "RepeatedMessage", },
typeof (self::TestEmbedOptimizedForSize), typeof (global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize),
typeof (self::TestEmbedOptimizedForSize.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder));
#endregion #endregion
} }
...@@ -69,32 +67,32 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -69,32 +67,32 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::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 InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestEmbedOptimizeForProtoFile.internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable; }
} }
// optional .protobuf_unittest.TestOptimizedForSize optional_message = 1; // optional .protobuf_unittest.TestOptimizedForSize optional_message = 1;
private bool hasOptionalMessage; private bool hasOptionalMessage;
private self::TestOptimizedForSize optionalMessage_ = self::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 self::TestOptimizedForSize OptionalMessage { public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage {
get { return optionalMessage_; } get { return optionalMessage_; }
} }
// repeated .protobuf_unittest.TestOptimizedForSize repeated_message = 2; // repeated .protobuf_unittest.TestOptimizedForSize repeated_message = 2;
private scg::IList<self::TestOptimizedForSize> repeatedMessage_ = pbc::Lists<self::TestOptimizedForSize>.Empty; private scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> repeatedMessage_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty;
public scg::IList<self::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 self::TestOptimizedForSize GetRepeatedMessage(int index) { public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) {
return repeatedMessage_ [index]; return repeatedMessage_ [index];
} }
...@@ -103,7 +101,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -103,7 +101,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (HasOptionalMessage) { if (HasOptionalMessage) {
if (!OptionalMessage.IsInitialized) return false; if (!OptionalMessage.IsInitialized) return false;
} }
foreach (self::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;
...@@ -114,7 +112,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -114,7 +112,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (HasOptionalMessage) { if (HasOptionalMessage) {
output.WriteMessage(1, OptionalMessage); output.WriteMessage(1, OptionalMessage);
} }
foreach (self::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);
...@@ -130,7 +128,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -130,7 +128,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (HasOptionalMessage) { if (HasOptionalMessage) {
size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage); size += pb::CodedOutputStream.ComputeMessageSize(1, OptionalMessage);
} }
foreach (self::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;
...@@ -139,35 +137,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -139,35 +137,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestEmbedOptimizedForSize ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestEmbedOptimizedForSize ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestEmbedOptimizedForSize ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestEmbedOptimizedForSize ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -175,26 +173,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -175,26 +173,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestEmbedOptimizedForSize prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::TestEmbedOptimizedForSize, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::TestEmbedOptimizedForSize.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.CreateBuilder()
internal Builder() {} internal Builder() {}
self::TestEmbedOptimizedForSize result = new self::TestEmbedOptimizedForSize(); global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize result = new global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize();
protected override self::TestEmbedOptimizedForSize MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::TestEmbedOptimizedForSize(); result = new global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize();
return this; return this;
} }
...@@ -203,39 +201,39 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -203,39 +201,39 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestEmbedOptimizedForSize.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Descriptor; }
} }
public override self::TestEmbedOptimizedForSize DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize DefaultInstanceForType {
get { return self::TestEmbedOptimizedForSize.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance; }
} }
public override self::TestEmbedOptimizedForSize BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize BuildPartial() {
if (result.repeatedMessage_ != pbc::Lists<self::TestOptimizedForSize>.Empty) { if (result.repeatedMessage_ != pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = pbc::Lists<self::TestOptimizedForSize>.AsReadOnly(result.repeatedMessage_); result.repeatedMessage_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.AsReadOnly(result.repeatedMessage_);
} }
self::TestEmbedOptimizedForSize returnMe = result; global::Google.ProtocolBuffers.TestProtos.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 self::TestEmbedOptimizedForSize) { if (other is global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize) {
return MergeFrom((self::TestEmbedOptimizedForSize) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::TestEmbedOptimizedForSize other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize other) {
if (other == self::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) {
if (result.repeatedMessage_.Count == 0) { if (result.repeatedMessage_.Count == 0) {
result.repeatedMessage_ = new scg::List<self::TestOptimizedForSize>(); result.repeatedMessage_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
} }
base.AddRange(other.repeatedMessage_, result.repeatedMessage_); base.AddRange(other.repeatedMessage_, result.repeatedMessage_);
} }
...@@ -265,7 +263,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -265,7 +263,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break; break;
} }
case 10: { case 10: {
self::TestOptimizedForSize.Builder subBuilder = self::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);
} }
...@@ -274,7 +272,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -274,7 +272,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break; break;
} }
case 18: { case 18: {
self::TestOptimizedForSize.Builder subBuilder = self::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;
...@@ -288,25 +286,25 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -288,25 +286,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasOptionalMessage { public bool HasOptionalMessage {
get { return result.HasOptionalMessage; } get { return result.HasOptionalMessage; }
} }
public self::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(self::TestOptimizedForSize value) { public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
result.hasOptionalMessage = true; result.hasOptionalMessage = true;
result.optionalMessage_ = value; result.optionalMessage_ = value;
return this; return this;
} }
public Builder SetOptionalMessage(self::TestOptimizedForSize.Builder builderForValue) { public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
result.hasOptionalMessage = true; result.hasOptionalMessage = true;
result.optionalMessage_ = builderForValue.Build(); result.optionalMessage_ = builderForValue.Build();
return this; return this;
} }
public Builder MergeOptionalMessage(self::TestOptimizedForSize value) { public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
if (result.HasOptionalMessage && if (result.HasOptionalMessage &&
result.optionalMessage_ != self::TestOptimizedForSize.DefaultInstance) { result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance) {
result.optionalMessage_ = result.optionalMessage_ =
self::TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial(); global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial();
} else { } else {
result.optionalMessage_ = value; result.optionalMessage_ = value;
} }
...@@ -315,51 +313,51 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -315,51 +313,51 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public Builder ClearOptionalMessage() { public Builder ClearOptionalMessage() {
result.hasOptionalMessage = false; result.hasOptionalMessage = false;
result.optionalMessage_ = self::TestOptimizedForSize.DefaultInstance; result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance;
return this; return this;
} }
// repeated .protobuf_unittest.TestOptimizedForSize repeated_message = 2; // repeated .protobuf_unittest.TestOptimizedForSize repeated_message = 2;
public scg::IList<self::TestOptimizedForSize> RepeatedMessageList { public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList {
get { return pbc::Lists.AsReadOnly(result.repeatedMessage_); } get { return pbc::Lists.AsReadOnly(result.repeatedMessage_); }
} }
public int RepeatedMessageCount { public int RepeatedMessageCount {
get { return result.RepeatedMessageCount; } get { return result.RepeatedMessageCount; }
} }
public self::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, self::TestOptimizedForSize value) { public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
result.repeatedMessage_[index] = value; result.repeatedMessage_[index] = value;
return this; return this;
} }
public Builder SetRepeatedMessage(int index, self::TestOptimizedForSize.Builder builderForValue) { public Builder SetRepeatedMessage(int index, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
result.repeatedMessage_[index] = builderForValue.Build(); result.repeatedMessage_[index] = builderForValue.Build();
return this; return this;
} }
public Builder AddRepeatedMessage(self::TestOptimizedForSize value) { public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
if (result.repeatedMessage_ == pbc::Lists<self::TestOptimizedForSize>.Empty) { if (result.repeatedMessage_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<self::TestOptimizedForSize>(); result.repeatedMessage_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
} }
result.repeatedMessage_.Add(value); result.repeatedMessage_.Add(value);
return this; return this;
} }
public Builder AddRepeatedMessage(self::TestOptimizedForSize.Builder builderForValue) { public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
if (result.repeatedMessage_ == pbc::Lists<self::TestOptimizedForSize>.Empty) { if (result.repeatedMessage_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<self::TestOptimizedForSize>(); result.repeatedMessage_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
} }
result.repeatedMessage_.Add(builderForValue.Build()); result.repeatedMessage_.Add(builderForValue.Build());
return this; return this;
} }
public Builder AddRangeRepeatedMessage(scg::IEnumerable<self::TestOptimizedForSize> values) { public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) {
if (result.repeatedMessage_ == pbc::Lists<self::TestOptimizedForSize>.Empty) { if (result.repeatedMessage_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<self::TestOptimizedForSize>(); result.repeatedMessage_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
} }
base.AddRange(values, result.repeatedMessage_); base.AddRange(values, result.repeatedMessage_);
return this; return this;
} }
public Builder ClearRepeatedMessage() { public Builder ClearRepeatedMessage() {
result.repeatedMessage_ = pbc::Lists<self::TestOptimizedForSize>.Empty; result.repeatedMessage_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty;
return this; return this;
} }
} }
......
...@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,8 +4,6 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestImportProtoFile { public static partial class UnitTestImportProtoFile {
...@@ -42,8 +40,8 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -42,8 +40,8 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_import_ImportMessage__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
new string[] { "D", }, new string[] { "D", },
typeof (self::ImportMessage), typeof (global::Google.ProtocolBuffers.TestProtos.ImportMessage),
typeof (self::ImportMessage.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder));
#endregion #endregion
} }
...@@ -69,11 +67,11 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -69,11 +67,11 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::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 InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestImportProtoFile.internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable; }
} }
// optional int32 d = 1; // optional int32 d = 1;
...@@ -115,35 +113,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -115,35 +113,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::ImportMessage ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::ImportMessage ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::ImportMessage ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::ImportMessage ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::ImportMessage ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::ImportMessage ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::ImportMessage ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::ImportMessage ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -151,26 +149,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -151,26 +149,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::ImportMessage prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.ImportMessage prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::ImportMessage, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.ImportMessage, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::ImportMessage.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.ImportMessage.CreateBuilder()
internal Builder() {} internal Builder() {}
self::ImportMessage result = new self::ImportMessage(); global::Google.ProtocolBuffers.TestProtos.ImportMessage result = new global::Google.ProtocolBuffers.TestProtos.ImportMessage();
protected override self::ImportMessage MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.ImportMessage MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::ImportMessage(); result = new global::Google.ProtocolBuffers.TestProtos.ImportMessage();
return this; return this;
} }
...@@ -179,30 +177,30 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -179,30 +177,30 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::ImportMessage.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; }
} }
public override self::ImportMessage DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.ImportMessage DefaultInstanceForType {
get { return self::ImportMessage.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
} }
public override self::ImportMessage BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.ImportMessage BuildPartial() {
self::ImportMessage returnMe = result; global::Google.ProtocolBuffers.TestProtos.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 self::ImportMessage) { if (other is global::Google.ProtocolBuffers.TestProtos.ImportMessage) {
return MergeFrom((self::ImportMessage) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.ImportMessage) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::ImportMessage other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.ImportMessage other) {
if (other == self::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;
} }
......
...@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,8 +4,6 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestMessageSetProtoFile { public static partial class UnitTestMessageSetProtoFile {
...@@ -63,43 +61,43 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -63,43 +61,43 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSet__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSet__Descriptor,
new string[] { }, new string[] { },
typeof (self::TestMessageSet), typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSet),
typeof (self::TestMessageSet.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor
= Descriptor.MessageTypes[1]; = Descriptor.MessageTypes[1];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor,
new string[] { "MessageSet", }, new string[] { "MessageSet", },
typeof (self::TestMessageSetContainer), typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer),
typeof (self::TestMessageSetContainer.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor
= Descriptor.MessageTypes[2]; = Descriptor.MessageTypes[2];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor,
new string[] { "I", }, new string[] { "I", },
typeof (self::TestMessageSetExtension1), typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1),
typeof (self::TestMessageSetExtension1.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor
= Descriptor.MessageTypes[3]; = Descriptor.MessageTypes[3];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor,
new string[] { "Str", }, new string[] { "Str", },
typeof (self::TestMessageSetExtension2), typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2),
typeof (self::TestMessageSetExtension2.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet__Descriptor internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet__Descriptor
= Descriptor.MessageTypes[4]; = Descriptor.MessageTypes[4];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet__Descriptor,
new string[] { "Item", }, new string[] { "Item", },
typeof (self::RawMessageSet), typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet),
typeof (self::RawMessageSet.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor
= internal__static_protobuf_unittest_RawMessageSet__Descriptor.NestedTypes[0]; = internal__static_protobuf_unittest_RawMessageSet__Descriptor.NestedTypes[0];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor,
new string[] { "TypeId", "Message", }, new string[] { "TypeId", "Message", },
typeof (self::RawMessageSet.Types.Item), typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item),
typeof (self::RawMessageSet.Types.Item.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder));
#endregion #endregion
} }
...@@ -119,11 +117,11 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -119,11 +117,11 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable; }
} }
public override bool IsInitialized { public override bool IsInitialized {
...@@ -153,35 +151,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -153,35 +151,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::TestMessageSet ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSet ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSet ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSet ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSet ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSet ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSet ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSet ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -189,26 +187,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -189,26 +187,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSet prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.TestMessageSet prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::ExtendableBuilder<self::TestMessageSet, self::TestMessageSet.Builder> { public sealed partial class Builder : pb::ExtendableBuilder<global::Google.ProtocolBuffers.TestProtos.TestMessageSet, global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::TestMessageSet.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder()
internal Builder() {} internal Builder() {}
self::TestMessageSet result = new self::TestMessageSet(); global::Google.ProtocolBuffers.TestProtos.TestMessageSet result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSet();
protected override self::TestMessageSet MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.TestMessageSet MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::TestMessageSet(); result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSet();
return this; return this;
} }
...@@ -217,30 +215,30 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -217,30 +215,30 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSet.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Descriptor; }
} }
public override self::TestMessageSet DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSet DefaultInstanceForType {
get { return self::TestMessageSet.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance; }
} }
public override self::TestMessageSet BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSet BuildPartial() {
self::TestMessageSet returnMe = result; global::Google.ProtocolBuffers.TestProtos.TestMessageSet 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 self::TestMessageSet) { if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSet) {
return MergeFrom((self::TestMessageSet) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSet) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::TestMessageSet other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSet other) {
if (other == self::TestMessageSet.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance) return this;
this.MergeUnknownFields(other.UnknownFields); this.MergeUnknownFields(other.UnknownFields);
return this; return this;
} }
...@@ -284,20 +282,20 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -284,20 +282,20 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable; }
} }
// optional .protobuf_unittest.TestMessageSet message_set = 1; // optional .protobuf_unittest.TestMessageSet message_set = 1;
private bool hasMessageSet; private bool hasMessageSet;
private self::TestMessageSet messageSet_ = self::TestMessageSet.DefaultInstance; private global::Google.ProtocolBuffers.TestProtos.TestMessageSet messageSet_ = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance;
public bool HasMessageSet { public bool HasMessageSet {
get { return hasMessageSet; } get { return hasMessageSet; }
} }
public self::TestMessageSet MessageSet { public global::Google.ProtocolBuffers.TestProtos.TestMessageSet MessageSet {
get { return messageSet_; } get { return messageSet_; }
} }
...@@ -333,35 +331,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -333,35 +331,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::TestMessageSetContainer ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSetContainer ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetContainer ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSetContainer ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetContainer ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSetContainer ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetContainer ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSetContainer ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -369,26 +367,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -369,26 +367,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSetContainer prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::TestMessageSetContainer, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::TestMessageSetContainer.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.CreateBuilder()
internal Builder() {} internal Builder() {}
self::TestMessageSetContainer result = new self::TestMessageSetContainer(); global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer();
protected override self::TestMessageSetContainer MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::TestMessageSetContainer(); result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer();
return this; return this;
} }
...@@ -397,30 +395,30 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -397,30 +395,30 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetContainer.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.Descriptor; }
} }
public override self::TestMessageSetContainer DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer DefaultInstanceForType {
get { return self::TestMessageSetContainer.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.DefaultInstance; }
} }
public override self::TestMessageSetContainer BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer BuildPartial() {
self::TestMessageSetContainer returnMe = result; global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer 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 self::TestMessageSetContainer) { if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer) {
return MergeFrom((self::TestMessageSetContainer) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::TestMessageSetContainer other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer other) {
if (other == self::TestMessageSetContainer.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.DefaultInstance) return this;
if (other.HasMessageSet) { if (other.HasMessageSet) {
MergeMessageSet(other.MessageSet); MergeMessageSet(other.MessageSet);
} }
...@@ -450,7 +448,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -450,7 +448,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break; break;
} }
case 10: { case 10: {
self::TestMessageSet.Builder subBuilder = self::TestMessageSet.CreateBuilder(); global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder();
if (HasMessageSet) { if (HasMessageSet) {
subBuilder.MergeFrom(MessageSet); subBuilder.MergeFrom(MessageSet);
} }
...@@ -467,25 +465,25 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -467,25 +465,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasMessageSet { public bool HasMessageSet {
get { return result.HasMessageSet; } get { return result.HasMessageSet; }
} }
public self::TestMessageSet MessageSet { public global::Google.ProtocolBuffers.TestProtos.TestMessageSet MessageSet {
get { return result.MessageSet; } get { return result.MessageSet; }
set { SetMessageSet(value); } set { SetMessageSet(value); }
} }
public Builder SetMessageSet(self::TestMessageSet value) { public Builder SetMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet value) {
result.hasMessageSet = true; result.hasMessageSet = true;
result.messageSet_ = value; result.messageSet_ = value;
return this; return this;
} }
public Builder SetMessageSet(self::TestMessageSet.Builder builderForValue) { public Builder SetMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder builderForValue) {
result.hasMessageSet = true; result.hasMessageSet = true;
result.messageSet_ = builderForValue.Build(); result.messageSet_ = builderForValue.Build();
return this; return this;
} }
public Builder MergeMessageSet(self::TestMessageSet value) { public Builder MergeMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet value) {
if (result.HasMessageSet && if (result.HasMessageSet &&
result.messageSet_ != self::TestMessageSet.DefaultInstance) { result.messageSet_ != global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance) {
result.messageSet_ = result.messageSet_ =
self::TestMessageSet.CreateBuilder(result.messageSet_).MergeFrom(value).BuildPartial(); global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder(result.messageSet_).MergeFrom(value).BuildPartial();
} else { } else {
result.messageSet_ = value; result.messageSet_ = value;
} }
...@@ -494,7 +492,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -494,7 +492,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public Builder ClearMessageSet() { public Builder ClearMessageSet() {
result.hasMessageSet = false; result.hasMessageSet = false;
result.messageSet_ = self::TestMessageSet.DefaultInstance; result.messageSet_ = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance;
return this; return this;
} }
} }
...@@ -511,15 +509,15 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -511,15 +509,15 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable; }
} }
public static readonly pb::GeneratedExtensionBase<self::TestMessageSetExtension1> MessageSetExtension = public static readonly pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1> MessageSetExtension =
pb::GeneratedSingleExtension<self::TestMessageSetExtension1>.CreateInstance(Descriptor.Extensions[0]); pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1>.CreateInstance(Descriptor.Extensions[0]);
#region Nested types #region Nested types
public static class Types { public static class Types {
} }
...@@ -564,35 +562,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -564,35 +562,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::TestMessageSetExtension1 ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSetExtension1 ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetExtension1 ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSetExtension1 ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetExtension1 ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSetExtension1 ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -600,26 +598,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -600,26 +598,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSetExtension1 prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::TestMessageSetExtension1, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::TestMessageSetExtension1.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.CreateBuilder()
internal Builder() {} internal Builder() {}
self::TestMessageSetExtension1 result = new self::TestMessageSetExtension1(); global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1();
protected override self::TestMessageSetExtension1 MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::TestMessageSetExtension1(); result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1();
return this; return this;
} }
...@@ -628,30 +626,30 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -628,30 +626,30 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetExtension1.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Descriptor; }
} }
public override self::TestMessageSetExtension1 DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 DefaultInstanceForType {
get { return self::TestMessageSetExtension1.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.DefaultInstance; }
} }
public override self::TestMessageSetExtension1 BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 BuildPartial() {
self::TestMessageSetExtension1 returnMe = result; global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 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 self::TestMessageSetExtension1) { if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1) {
return MergeFrom((self::TestMessageSetExtension1) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::TestMessageSetExtension1 other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 other) {
if (other == self::TestMessageSetExtension1.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.DefaultInstance) return this;
if (other.HasI) { if (other.HasI) {
I = other.I; I = other.I;
} }
...@@ -721,15 +719,15 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -721,15 +719,15 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable; }
} }
public static readonly pb::GeneratedExtensionBase<self::TestMessageSetExtension2> MessageSetExtension = public static readonly pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2> MessageSetExtension =
pb::GeneratedSingleExtension<self::TestMessageSetExtension2>.CreateInstance(Descriptor.Extensions[0]); pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2>.CreateInstance(Descriptor.Extensions[0]);
#region Nested types #region Nested types
public static class Types { public static class Types {
} }
...@@ -774,35 +772,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -774,35 +772,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::TestMessageSetExtension2 ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSetExtension2 ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetExtension2 ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestMessageSetExtension2 ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetExtension2 ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSetExtension2 ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -810,26 +808,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -810,26 +808,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestMessageSetExtension2 prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::TestMessageSetExtension2, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::TestMessageSetExtension2.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.CreateBuilder()
internal Builder() {} internal Builder() {}
self::TestMessageSetExtension2 result = new self::TestMessageSetExtension2(); global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2();
protected override self::TestMessageSetExtension2 MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::TestMessageSetExtension2(); result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2();
return this; return this;
} }
...@@ -838,30 +836,30 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -838,30 +836,30 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetExtension2.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Descriptor; }
} }
public override self::TestMessageSetExtension2 DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 DefaultInstanceForType {
get { return self::TestMessageSetExtension2.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.DefaultInstance; }
} }
public override self::TestMessageSetExtension2 BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 BuildPartial() {
self::TestMessageSetExtension2 returnMe = result; global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 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 self::TestMessageSetExtension2) { if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2) {
return MergeFrom((self::TestMessageSetExtension2) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::TestMessageSetExtension2 other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 other) {
if (other == self::TestMessageSetExtension2.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.DefaultInstance) return this;
if (other.HasStr) { if (other.HasStr) {
Str = other.Str; Str = other.Str;
} }
...@@ -931,11 +929,11 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -931,11 +929,11 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable; }
} }
#region Nested types #region Nested types
...@@ -951,11 +949,11 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -951,11 +949,11 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestMessageSetProtoFile.internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable; }
} }
// required int32 type_id = 2; // required int32 type_id = 2;
...@@ -1015,35 +1013,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1015,35 +1013,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::RawMessageSet.Types.Item ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::RawMessageSet.Types.Item ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::RawMessageSet.Types.Item ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::RawMessageSet.Types.Item ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::RawMessageSet.Types.Item ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::RawMessageSet.Types.Item ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::RawMessageSet.Types.Item ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::RawMessageSet.Types.Item ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -1051,26 +1049,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1051,26 +1049,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::RawMessageSet.Types.Item prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::RawMessageSet.Types.Item, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::RawMessageSet.Types.Item.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.CreateBuilder()
internal Builder() {} internal Builder() {}
self::RawMessageSet.Types.Item result = new self::RawMessageSet.Types.Item(); global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item result = new global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item();
protected override self::RawMessageSet.Types.Item MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::RawMessageSet.Types.Item(); result = new global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item();
return this; return this;
} }
...@@ -1079,30 +1077,30 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1079,30 +1077,30 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::RawMessageSet.Types.Item.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Descriptor; }
} }
public override self::RawMessageSet.Types.Item DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item DefaultInstanceForType {
get { return self::RawMessageSet.Types.Item.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.DefaultInstance; }
} }
public override self::RawMessageSet.Types.Item BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item BuildPartial() {
self::RawMessageSet.Types.Item returnMe = result; global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item 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 self::RawMessageSet.Types.Item) { if (other is global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item) {
return MergeFrom((self::RawMessageSet.Types.Item) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::RawMessageSet.Types.Item other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item other) {
if (other == self::RawMessageSet.Types.Item.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.DefaultInstance) return this;
if (other.HasTypeId) { if (other.HasTypeId) {
TypeId = other.TypeId; TypeId = other.TypeId;
} }
...@@ -1191,20 +1189,20 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1191,20 +1189,20 @@ namespace Google.ProtocolBuffers.TestProtos {
#endregion #endregion
// repeated group Item = 1 { // repeated group Item = 1 {
private scg::IList<self::RawMessageSet.Types.Item> item_ = pbc::Lists<self::RawMessageSet.Types.Item>.Empty; private scg::IList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> item_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty;
public scg::IList<self::RawMessageSet.Types.Item> ItemList { public scg::IList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> ItemList {
get { return item_; } get { return item_; }
} }
public int ItemCount public int ItemCount
{ get { return item_.Count; } { get { return item_.Count; }
} }
public self::RawMessageSet.Types.Item GetItem(int index) { public global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item GetItem(int index) {
return item_ [index]; return item_ [index];
} }
public override bool IsInitialized { public override bool IsInitialized {
get { get {
foreach (self::RawMessageSet.Types.Item element in ItemList) { foreach (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item element in ItemList) {
if (!element.IsInitialized) return false; if (!element.IsInitialized) return false;
} }
return true; return true;
...@@ -1212,7 +1210,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1212,7 +1210,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override void WriteTo(pb::CodedOutputStream output) { public override void WriteTo(pb::CodedOutputStream output) {
foreach (self::RawMessageSet.Types.Item element in ItemList) { foreach (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item element in ItemList) {
output.WriteGroup(1, element); output.WriteGroup(1, element);
} }
UnknownFields.WriteTo(output); UnknownFields.WriteTo(output);
...@@ -1225,7 +1223,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1225,7 +1223,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
foreach (self::RawMessageSet.Types.Item element in ItemList) { foreach (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item element in ItemList) {
size += pb::CodedOutputStream.ComputeGroupSize(1, element); size += pb::CodedOutputStream.ComputeGroupSize(1, element);
} }
size += UnknownFields.SerializedSize; size += UnknownFields.SerializedSize;
...@@ -1234,35 +1232,35 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1234,35 +1232,35 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
} }
public static self::RawMessageSet ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::RawMessageSet ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::RawMessageSet ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::RawMessageSet ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::RawMessageSet ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::RawMessageSet ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::RawMessageSet ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::RawMessageSet ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -1270,26 +1268,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1270,26 +1268,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::RawMessageSet prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.RawMessageSet prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::GeneratedBuilder<self::RawMessageSet, Builder> { public sealed partial class Builder : pb::GeneratedBuilder<global::Google.ProtocolBuffers.TestProtos.RawMessageSet, Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::RawMessageSet.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.RawMessageSet.CreateBuilder()
internal Builder() {} internal Builder() {}
self::RawMessageSet result = new self::RawMessageSet(); global::Google.ProtocolBuffers.TestProtos.RawMessageSet result = new global::Google.ProtocolBuffers.TestProtos.RawMessageSet();
protected override self::RawMessageSet MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.RawMessageSet MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::RawMessageSet(); result = new global::Google.ProtocolBuffers.TestProtos.RawMessageSet();
return this; return this;
} }
...@@ -1298,36 +1296,36 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1298,36 +1296,36 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::RawMessageSet.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Descriptor; }
} }
public override self::RawMessageSet DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet DefaultInstanceForType {
get { return self::RawMessageSet.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance; }
} }
public override self::RawMessageSet BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet BuildPartial() {
if (result.item_ != pbc::Lists<self::RawMessageSet.Types.Item>.Empty) { if (result.item_ != pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
result.item_ = pbc::Lists<self::RawMessageSet.Types.Item>.AsReadOnly(result.item_); result.item_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.AsReadOnly(result.item_);
} }
self::RawMessageSet returnMe = result; global::Google.ProtocolBuffers.TestProtos.RawMessageSet 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 self::RawMessageSet) { if (other is global::Google.ProtocolBuffers.TestProtos.RawMessageSet) {
return MergeFrom((self::RawMessageSet) other); return MergeFrom((global::Google.ProtocolBuffers.TestProtos.RawMessageSet) other);
} else { } else {
base.MergeFrom(other); base.MergeFrom(other);
return this; return this;
} }
} }
public override Builder MergeFrom(self::RawMessageSet other) { public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.RawMessageSet other) {
if (other == self::RawMessageSet.DefaultInstance) return this; if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance) return this;
if (other.item_.Count != 0) { if (other.item_.Count != 0) {
if (result.item_.Count == 0) { if (result.item_.Count == 0) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>(); result.item_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
} }
base.AddRange(other.item_, result.item_); base.AddRange(other.item_, result.item_);
} }
...@@ -1357,7 +1355,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1357,7 +1355,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break; break;
} }
case 11: { case 11: {
self::RawMessageSet.Types.Item.Builder subBuilder = self::RawMessageSet.Types.Item.CreateBuilder(); global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.CreateBuilder();
input.ReadGroup(1, subBuilder, extensionRegistry); input.ReadGroup(1, subBuilder, extensionRegistry);
AddItem(subBuilder.BuildPartial()); AddItem(subBuilder.BuildPartial());
break; break;
...@@ -1368,46 +1366,46 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -1368,46 +1366,46 @@ namespace Google.ProtocolBuffers.TestProtos {
// repeated group Item = 1 { // repeated group Item = 1 {
public scg::IList<self::RawMessageSet.Types.Item> ItemList { public scg::IList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> ItemList {
get { return pbc::Lists.AsReadOnly(result.item_); } get { return pbc::Lists.AsReadOnly(result.item_); }
} }
public int ItemCount { public int ItemCount {
get { return result.ItemCount; } get { return result.ItemCount; }
} }
public self::RawMessageSet.Types.Item GetItem(int index) { public global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item GetItem(int index) {
return result.GetItem(index); return result.GetItem(index);
} }
public Builder SetItem(int index, self::RawMessageSet.Types.Item value) { public Builder SetItem(int index, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item value) {
result.item_[index] = value; result.item_[index] = value;
return this; return this;
} }
public Builder SetItem(int index, self::RawMessageSet.Types.Item.Builder builderForValue) { public Builder SetItem(int index, global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder builderForValue) {
result.item_[index] = builderForValue.Build(); result.item_[index] = builderForValue.Build();
return this; return this;
} }
public Builder AddItem(self::RawMessageSet.Types.Item value) { public Builder AddItem(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item value) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) { if (result.item_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>(); result.item_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
} }
result.item_.Add(value); result.item_.Add(value);
return this; return this;
} }
public Builder AddItem(self::RawMessageSet.Types.Item.Builder builderForValue) { public Builder AddItem(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder builderForValue) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) { if (result.item_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>(); result.item_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
} }
result.item_.Add(builderForValue.Build()); result.item_.Add(builderForValue.Build());
return this; return this;
} }
public Builder AddRangeItem(scg::IEnumerable<self::RawMessageSet.Types.Item> values) { public Builder AddRangeItem(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> values) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) { if (result.item_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>(); result.item_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
} }
base.AddRange(values, result.item_); base.AddRange(values, result.item_);
return this; return this;
} }
public Builder ClearItem() { public Builder ClearItem() {
result.item_ = pbc::Lists<self::RawMessageSet.Types.Item>.Empty; result.item_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty;
return this; return this;
} }
} }
......
...@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers; ...@@ -4,8 +4,6 @@ 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;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos { namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestOptimizeForProtoFile { public static partial class UnitTestOptimizeForProtoFile {
...@@ -34,7 +32,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -34,7 +32,7 @@ namespace Google.ProtocolBuffers.TestProtos {
0x55, 0x6e, 0x69, 0x74, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x55, 0x6e, 0x69, 0x74, 0x54, 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65,
}, new pbd::FileDescriptor[] { }, new pbd::FileDescriptor[] {
self::UnitTestProtoFile.Descriptor, global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor,
}); });
#endregion #endregion
...@@ -47,8 +45,8 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -47,8 +45,8 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor, = new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor,
new string[] { "I", "Msg", }, new string[] { "I", "Msg", },
typeof (self::TestOptimizedForSize), typeof (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize),
typeof (self::TestOptimizedForSize.Builder)); typeof (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder));
#endregion #endregion
} }
...@@ -68,11 +66,11 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -68,11 +66,11 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public static pbd::MessageDescriptor Descriptor { public static pbd::MessageDescriptor Descriptor {
get { return self::UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor; }
} }
protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors { protected override pb::FieldAccess.FieldAccessorTable InternalFieldAccessors {
get { return self::UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable; } get { return global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable; }
} }
public static readonly pb::GeneratedExtensionBase<int> TestExtension = public static readonly pb::GeneratedExtensionBase<int> TestExtension =
...@@ -94,43 +92,43 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -94,43 +92,43 @@ namespace Google.ProtocolBuffers.TestProtos {
// optional .protobuf_unittest.ForeignMessage msg = 19; // optional .protobuf_unittest.ForeignMessage msg = 19;
private bool hasMsg; private bool hasMsg;
private self::ForeignMessage msg_ = self::ForeignMessage.DefaultInstance; private global::Google.ProtocolBuffers.TestProtos.ForeignMessage msg_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance;
public bool HasMsg { public bool HasMsg {
get { return hasMsg; } get { return hasMsg; }
} }
public self::ForeignMessage Msg { public global::Google.ProtocolBuffers.TestProtos.ForeignMessage Msg {
get { return msg_; } get { return msg_; }
} }
public static self::TestOptimizedForSize ParseFrom(pb::ByteString data) { public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::ByteString data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestOptimizedForSize ParseFrom(pb::ByteString data, public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestOptimizedForSize ParseFrom(byte[] data) { public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(byte[] data) {
return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(data)).BuildParsed();
} }
public static self::TestOptimizedForSize ParseFrom(byte[] data, public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestOptimizedForSize ParseFrom(global::System.IO.Stream input) { public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(global::System.IO.Stream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestOptimizedForSize ParseFrom( public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(
global::System.IO.Stream input, global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
} }
public static self::TestOptimizedForSize ParseFrom(pb::CodedInputStream input) { public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::CodedInputStream input) {
return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed(); return ((Builder) CreateBuilder().MergeFrom(input)).BuildParsed();
} }
public static self::TestOptimizedForSize ParseFrom(pb::CodedInputStream input, public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) { pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)) return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed(); .BuildParsed();
...@@ -138,26 +136,26 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -138,26 +136,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { return new Builder(); } public static Builder CreateBuilder() { return new Builder(); }
public override Builder CreateBuilderForType() { return new Builder(); } public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(self::TestOptimizedForSize prototype) { public static Builder CreateBuilder(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize prototype) {
return (Builder) new Builder().MergeFrom(prototype); return (Builder) new Builder().MergeFrom(prototype);
} }
public sealed partial class Builder : pb::ExtendableBuilder<self::TestOptimizedForSize, self::TestOptimizedForSize.Builder> { public sealed partial class Builder : pb::ExtendableBuilder<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize, global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder> {
protected override Builder ThisBuilder { protected override Builder ThisBuilder {
get { return this; } get { return this; }
} }
// Construct using self::TestOptimizedForSize.CreateBuilder() // Construct using global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder()
internal Builder() {} internal Builder() {}
self::TestOptimizedForSize result = new self::TestOptimizedForSize(); global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize result = new global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize();
protected override self::TestOptimizedForSize MessageBeingBuilt { protected override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize MessageBeingBuilt {
get { return result; } get { return result; }
} }
public override Builder Clear() { public override Builder Clear() {
result = new self::TestOptimizedForSize(); result = new global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize();
return this; return this;
} }
...@@ -166,15 +164,15 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -166,15 +164,15 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public override pbd::MessageDescriptor DescriptorForType { public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestOptimizedForSize.Descriptor; } get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Descriptor; }
} }
public override self::TestOptimizedForSize DefaultInstanceForType { public override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize DefaultInstanceForType {
get { return self::TestOptimizedForSize.DefaultInstance; } get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; }
} }
public override self::TestOptimizedForSize BuildPartial() { public override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize BuildPartial() {
self::TestOptimizedForSize returnMe = result; global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize returnMe = result;
result = null; result = null;
return returnMe; return returnMe;
} }
...@@ -203,25 +201,25 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -203,25 +201,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasMsg { public bool HasMsg {
get { return result.HasMsg; } get { return result.HasMsg; }
} }
public self::ForeignMessage Msg { public global::Google.ProtocolBuffers.TestProtos.ForeignMessage Msg {
get { return result.Msg; } get { return result.Msg; }
set { SetMsg(value); } set { SetMsg(value); }
} }
public Builder SetMsg(self::ForeignMessage value) { public Builder SetMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
result.hasMsg = true; result.hasMsg = true;
result.msg_ = value; result.msg_ = value;
return this; return this;
} }
public Builder SetMsg(self::ForeignMessage.Builder builderForValue) { public Builder SetMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
result.hasMsg = true; result.hasMsg = true;
result.msg_ = builderForValue.Build(); result.msg_ = builderForValue.Build();
return this; return this;
} }
public Builder MergeMsg(self::ForeignMessage value) { public Builder MergeMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
if (result.HasMsg && if (result.HasMsg &&
result.msg_ != self::ForeignMessage.DefaultInstance) { result.msg_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
result.msg_ = result.msg_ =
self::ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial(); global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial();
} else { } else {
result.msg_ = value; result.msg_ = value;
} }
...@@ -230,7 +228,7 @@ namespace Google.ProtocolBuffers.TestProtos { ...@@ -230,7 +228,7 @@ namespace Google.ProtocolBuffers.TestProtos {
} }
public Builder ClearMsg() { public Builder ClearMsg() {
result.hasMsg = false; result.hasMsg = false;
result.msg_ = self::ForeignMessage.DefaultInstance; result.msg_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance;
return this; return this;
} }
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -95,8 +95,6 @@ void FileGenerator::Generate(io::Printer* printer) { ...@@ -95,8 +95,6 @@ void FileGenerator::Generate(io::Printer* printer) {
printer->Print("using scg = global::System.Collections.Generic;\r\n"); printer->Print("using scg = global::System.Collections.Generic;\r\n");
if (!csharp_namespace_.empty()) { if (!csharp_namespace_.empty()) {
printer->Print("using self = global::$selfnamespace$;\r\n\r\n",
"selfnamespace", csharp_namespace_);
printer->Print( printer->Print(
"namespace $namespace$ {\r\n", "namespace $namespace$ {\r\n",
"namespace", csharp_namespace_); "namespace", csharp_namespace_);
...@@ -238,8 +236,6 @@ static void GenerateSibling(const string& csharp_namespace, ...@@ -238,8 +236,6 @@ static void GenerateSibling(const string& csharp_namespace,
printer.Print("using scg = global::System.Collections.Generic;\r\n"); printer.Print("using scg = global::System.Collections.Generic;\r\n");
if (!csharp_namespace.empty()) { if (!csharp_namespace.empty()) {
printer.Print("using self = global::$selfnamespace$;\r\n\r\n",
"selfnamespace", csharp_namespace);
printer.Print( printer.Print(
"namespace $namespace$ {\r\n", "namespace $namespace$ {\r\n",
"namespace", csharp_namespace); "namespace", csharp_namespace);
......
...@@ -138,7 +138,7 @@ string FileCSharpNamespace(const FileDescriptor* file) { ...@@ -138,7 +138,7 @@ string FileCSharpNamespace(const FileDescriptor* file) {
string ToCSharpName(const string& full_name, const FileDescriptor* file) { string ToCSharpName(const string& full_name, const FileDescriptor* file) {
string result; string result;
if (!file->options().csharp_nest_classes()) { if (!file->options().csharp_nest_classes()) {
result = ""; result = FileCSharpNamespace(file);
} else { } else {
result = ClassName(file); result = ClassName(file);
} }
...@@ -150,17 +150,18 @@ string ToCSharpName(const string& full_name, const FileDescriptor* file) { ...@@ -150,17 +150,18 @@ string ToCSharpName(const string& full_name, const FileDescriptor* file) {
classname = full_name; classname = full_name;
} else { } else {
// Strip the proto package from full_name since we've replaced it with // Strip the proto package from full_name since we've replaced it with
// the C# package. // the C# namespace.
classname = full_name.substr(file->package().size() + 1); classname = full_name.substr(file->package().size() + 1);
} }
result += StringReplace(classname, ".", ".Types.", true); result += StringReplace(classname, ".", ".Types.", true);
const char *prefix = FileCSharpNamespace(file).empty() ? "global::" : "self::"; return "global::" + result;
return prefix + result;
} }
string ClassName(const FileDescriptor* descriptor) { string ClassName(const FileDescriptor* descriptor) {
string alias = FileCSharpNamespace(descriptor).empty() ? "global::" : "self::"; string result = FileCSharpNamespace(descriptor);
return alias + FileClassName(descriptor); if (!result.empty()) result += '.';
result += FileClassName(descriptor);
return "global::" + result;
} }
MappedType GetMappedType(FieldDescriptor::Type field_type) { MappedType GetMappedType(FieldDescriptor::Type field_type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment