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;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public enum EnumWithNoOuter {
......
......@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public sealed partial class MessageWithNoOuter : pb::GeneratedMessage<MessageWithNoOuter, MessageWithNoOuter.Builder> {
......@@ -19,11 +17,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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
......@@ -43,11 +41,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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;
......@@ -60,35 +58,35 @@ namespace Google.ProtocolBuffers.TestProtos {
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();
}
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data,
public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::MessageWithNoOuter.Types.NestedMessage ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.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();
}
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) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -96,26 +94,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::MessageWithNoOuter.Types.NestedMessage.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::MessageWithNoOuter.Types.NestedMessage();
result = new global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage();
return this;
}
......@@ -124,15 +122,15 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
get { return self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.DefaultInstance; }
}
public override self::MessageWithNoOuter.Types.NestedMessage BuildPartial() {
self::MessageWithNoOuter.Types.NestedMessage returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage returnMe = result;
result = null;
return returnMe;
}
......@@ -164,71 +162,71 @@ namespace Google.ProtocolBuffers.TestProtos {
// optional .protobuf_unittest.MessageWithNoOuter.NestedMessage nested = 1;
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 {
get { return hasNested; }
}
public self::MessageWithNoOuter.Types.NestedMessage Nested {
public global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage Nested {
get { return nested_; }
}
// repeated .protobuf_unittest.TestAllTypes foreign = 2;
private scg::IList<self::TestAllTypes> foreign_ = pbc::Lists<self::TestAllTypes>.Empty;
public scg::IList<self::TestAllTypes> ForeignList {
private scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> foreign_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty;
public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> ForeignList {
get { return foreign_; }
}
public int ForeignCount
{ get { return foreign_.Count; }
}
public self::TestAllTypes GetForeign(int index) {
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetForeign(int index) {
return foreign_ [index];
}
// optional .protobuf_unittest.MessageWithNoOuter.NestedEnum nested_enum = 3;
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 {
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;
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 {
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();
}
public static self::MessageWithNoOuter ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::MessageWithNoOuter ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::MessageWithNoOuter ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.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();
}
public static self::MessageWithNoOuter ParseFrom(pb::CodedInputStream input,
public static global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -236,26 +234,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::MessageWithNoOuter.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::MessageWithNoOuter();
result = new global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter();
return this;
}
......@@ -264,18 +262,18 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::MessageWithNoOuter.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Descriptor; }
}
public override self::MessageWithNoOuter DefaultInstanceForType {
get { return self::MessageWithNoOuter.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.DefaultInstance; }
}
public override self::MessageWithNoOuter BuildPartial() {
if (result.foreign_ != pbc::Lists<self::TestAllTypes>.Empty) {
result.foreign_ = pbc::Lists<self::TestAllTypes>.AsReadOnly(result.foreign_);
public override global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter BuildPartial() {
if (result.foreign_ != pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
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;
return returnMe;
}
......@@ -285,25 +283,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasNested {
get { return result.HasNested; }
}
public self::MessageWithNoOuter.Types.NestedMessage Nested {
public global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage Nested {
get { return result.Nested; }
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.nested_ = value;
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.nested_ = builderForValue.Build();
return this;
}
public Builder MergeNested(self::MessageWithNoOuter.Types.NestedMessage value) {
public Builder MergeNested(global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage value) {
if (result.HasNested &&
result.nested_ != self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance) {
result.nested_ != global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.DefaultInstance) {
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 {
result.nested_ = value;
}
......@@ -312,51 +310,51 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public Builder ClearNested() {
result.hasNested = false;
result.nested_ = self::MessageWithNoOuter.Types.NestedMessage.DefaultInstance;
result.nested_ = global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.DefaultInstance;
return this;
}
// 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_); }
}
public int ForeignCount {
get { return result.ForeignCount; }
}
public self::TestAllTypes GetForeign(int index) {
public global::Google.ProtocolBuffers.TestProtos.TestAllTypes GetForeign(int 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;
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();
return this;
}
public Builder AddForeign(self::TestAllTypes value) {
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) {
result.foreign_ = new scg::List<self::TestAllTypes>();
public Builder AddForeign(global::Google.ProtocolBuffers.TestProtos.TestAllTypes value) {
if (result.foreign_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
result.foreign_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
}
result.foreign_.Add(value);
return this;
}
public Builder AddForeign(self::TestAllTypes.Builder builderForValue) {
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) {
result.foreign_ = new scg::List<self::TestAllTypes>();
public Builder AddForeign(global::Google.ProtocolBuffers.TestProtos.TestAllTypes.Builder builderForValue) {
if (result.foreign_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
result.foreign_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
}
result.foreign_.Add(builderForValue.Build());
return this;
}
public Builder AddRangeForeign(scg::IEnumerable<self::TestAllTypes> values) {
if (result.foreign_ == pbc::Lists<self::TestAllTypes>.Empty) {
result.foreign_ = new scg::List<self::TestAllTypes>();
public Builder AddRangeForeign(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> values) {
if (result.foreign_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty) {
result.foreign_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>();
}
base.AddRange(values, result.foreign_);
return this;
}
public Builder ClearForeign() {
result.foreign_ = pbc::Lists<self::TestAllTypes>.Empty;
result.foreign_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>.Empty;
return this;
}
......@@ -364,18 +362,18 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasNestedEnum {
get { return result.HasNestedEnum; }
}
public self::MessageWithNoOuter.Types.NestedEnum NestedEnum {
public global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum NestedEnum {
get { return result.NestedEnum; }
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.nestedEnum_ = value;
return this;
}
public Builder ClearNestedEnum() {
result.hasNestedEnum = false;
result.nestedEnum_ = self::MessageWithNoOuter.Types.NestedEnum.BAZ;
result.nestedEnum_ = global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedEnum.BAZ;
return this;
}
......@@ -383,18 +381,18 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasForeignEnum {
get { return result.HasForeignEnum; }
}
public self::EnumWithNoOuter ForeignEnum {
public global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter ForeignEnum {
get { return result.ForeignEnum; }
set { SetForeignEnum(value); }
}
public Builder SetForeignEnum(self::EnumWithNoOuter value) {
public Builder SetForeignEnum(global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter value) {
result.hasForeignEnum = true;
result.foreignEnum_ = value;
return this;
}
public Builder ClearForeignEnum() {
result.hasForeignEnum = false;
result.foreignEnum_ = self::EnumWithNoOuter.FOO;
result.foreignEnum_ = global::Google.ProtocolBuffers.TestProtos.EnumWithNoOuter.FOO;
return this;
}
}
......
......@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public static partial class MultiFileProto {
......@@ -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,
0x6f, 0x74, 0x6f, 0xd0, 0x3e, 0x01, 0xd8, 0x3e, 0x00, 0xe0, 0x3e, 0x01,
}, new pbd::FileDescriptor[] {
self::UnitTestProtoFile.Descriptor,
global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor,
});
#endregion
......@@ -69,15 +67,15 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor,
new string[] { "Nested", "Foreign", "NestedEnum", "ForeignEnum", },
typeof (self::MessageWithNoOuter),
typeof (self::MessageWithNoOuter.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter),
typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor
= internal__static_protobuf_unittest_MessageWithNoOuter__Descriptor.NestedTypes[0];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_MessageWithNoOuter_NestedMessage__Descriptor,
new string[] { "I", },
typeof (self::MessageWithNoOuter.Types.NestedMessage),
typeof (self::MessageWithNoOuter.Types.NestedMessage.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage),
typeof (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.Types.NestedMessage.Builder));
#endregion
}
......
......@@ -4,18 +4,16 @@ using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public abstract class ServiceWithNoOuter : pb::IService {
public abstract void Foo(
pb::IRpcController controller,
self::MessageWithNoOuter request,
global::System.Action<self::TestAllTypes> done);
global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter request,
global::System.Action<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> done);
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 {
get { return Descriptor; }
......@@ -33,8 +31,8 @@ namespace Google.ProtocolBuffers.TestProtos {
}
switch(method.Index) {
case 0:
this.Foo(controller, (self::MessageWithNoOuter)request,
pb::RpcUtil.SpecializeCallback<self::TestAllTypes>(
this.Foo(controller, (global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter)request,
pb::RpcUtil.SpecializeCallback<global::Google.ProtocolBuffers.TestProtos.TestAllTypes>(
done));
return;
default:
......@@ -50,7 +48,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
switch(method.Index) {
case 0:
return self::MessageWithNoOuter.DefaultInstance;
return global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter.DefaultInstance;
default:
throw new global::System.ArgumentException("Can't get here.");
}
......@@ -64,7 +62,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
switch(method.Index) {
case 0:
return self::TestAllTypes.DefaultInstance;
return global::Google.ProtocolBuffers.TestProtos.TestAllTypes.DefaultInstance;
default:
throw new global::System.ArgumentException("Can't get here.");
}
......@@ -75,7 +73,7 @@ namespace Google.ProtocolBuffers.TestProtos {
return new Stub(channel);
}
public class Stub : self::ServiceWithNoOuter {
public class Stub : global::Google.ProtocolBuffers.TestProtos.ServiceWithNoOuter {
internal Stub(pb::IRpcChannel channel) {
this.channel = channel;
}
......@@ -88,14 +86,14 @@ namespace Google.ProtocolBuffers.TestProtos {
public override void Foo(
pb::IRpcController controller,
self::MessageWithNoOuter request,
global::System.Action<self::TestAllTypes> done) {
global::Google.ProtocolBuffers.TestProtos.MessageWithNoOuter request,
global::System.Action<global::Google.ProtocolBuffers.TestProtos.TestAllTypes> done) {
channel.CallMethod(
Descriptor.Methods[0],
controller,
request,
self::TestAllTypes.DefaultInstance,
pb::RpcUtil.GeneralizeCallback<self::TestAllTypes, self::TestAllTypes.Builder>(done, self::TestAllTypes.DefaultInstance));
global::Google.ProtocolBuffers.TestProtos.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;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestEmbedOptimizeForProtoFile {
......@@ -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,
0x69, 0x7a, 0x65, 0x46, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65,
}, new pbd::FileDescriptor[] {
self::UnitTestOptimizeForProtoFile.Descriptor,
global::Google.ProtocolBuffers.TestProtos.UnitTestOptimizeForProtoFile.Descriptor,
});
#endregion
......@@ -48,8 +46,8 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestEmbedOptimizedForSize__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestEmbedOptimizedForSize__Descriptor,
new string[] { "OptionalMessage", "RepeatedMessage", },
typeof (self::TestEmbedOptimizedForSize),
typeof (self::TestEmbedOptimizedForSize.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize),
typeof (global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Builder));
#endregion
}
......@@ -69,32 +67,32 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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;
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 {
get { return hasOptionalMessage; }
}
public self::TestOptimizedForSize OptionalMessage {
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage {
get { return optionalMessage_; }
}
// repeated .protobuf_unittest.TestOptimizedForSize repeated_message = 2;
private scg::IList<self::TestOptimizedForSize> repeatedMessage_ = pbc::Lists<self::TestOptimizedForSize>.Empty;
public scg::IList<self::TestOptimizedForSize> RepeatedMessageList {
private scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> repeatedMessage_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty;
public scg::IList<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> RepeatedMessageList {
get { return repeatedMessage_; }
}
public int RepeatedMessageCount
{ get { return repeatedMessage_.Count; }
}
public self::TestOptimizedForSize GetRepeatedMessage(int index) {
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int index) {
return repeatedMessage_ [index];
}
......@@ -103,7 +101,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (HasOptionalMessage) {
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;
}
return true;
......@@ -114,7 +112,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (HasOptionalMessage) {
output.WriteMessage(1, OptionalMessage);
}
foreach (self::TestOptimizedForSize element in RepeatedMessageList) {
foreach (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize element in RepeatedMessageList) {
output.WriteMessage(2, element);
}
UnknownFields.WriteTo(output);
......@@ -130,7 +128,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (HasOptionalMessage) {
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 += UnknownFields.SerializedSize;
......@@ -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();
}
public static self::TestEmbedOptimizedForSize ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestEmbedOptimizedForSize ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::TestEmbedOptimizedForSize ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.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();
}
public static self::TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input,
public static global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -175,26 +173,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::TestEmbedOptimizedForSize.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::TestEmbedOptimizedForSize();
result = new global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize();
return this;
}
......@@ -203,39 +201,39 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestEmbedOptimizedForSize.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.Descriptor; }
}
public override self::TestEmbedOptimizedForSize DefaultInstanceForType {
get { return self::TestEmbedOptimizedForSize.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance; }
}
public override self::TestEmbedOptimizedForSize BuildPartial() {
if (result.repeatedMessage_ != pbc::Lists<self::TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = pbc::Lists<self::TestOptimizedForSize>.AsReadOnly(result.repeatedMessage_);
public override global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize BuildPartial() {
if (result.repeatedMessage_ != pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
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;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::TestEmbedOptimizedForSize) {
return MergeFrom((self::TestEmbedOptimizedForSize) other);
if (other is global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::TestEmbedOptimizedForSize other) {
if (other == self::TestEmbedOptimizedForSize.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestEmbedOptimizedForSize.DefaultInstance) return this;
if (other.HasOptionalMessage) {
MergeOptionalMessage(other.OptionalMessage);
}
if (other.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_);
}
......@@ -265,7 +263,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break;
}
case 10: {
self::TestOptimizedForSize.Builder subBuilder = self::TestOptimizedForSize.CreateBuilder();
global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder();
if (HasOptionalMessage) {
subBuilder.MergeFrom(OptionalMessage);
}
......@@ -274,7 +272,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break;
}
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);
AddRepeatedMessage(subBuilder.BuildPartial());
break;
......@@ -288,25 +286,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasOptionalMessage {
get { return result.HasOptionalMessage; }
}
public self::TestOptimizedForSize OptionalMessage {
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage {
get { return result.OptionalMessage; }
set { SetOptionalMessage(value); }
}
public Builder SetOptionalMessage(self::TestOptimizedForSize value) {
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
result.hasOptionalMessage = true;
result.optionalMessage_ = value;
return this;
}
public Builder SetOptionalMessage(self::TestOptimizedForSize.Builder builderForValue) {
public Builder SetOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
result.hasOptionalMessage = true;
result.optionalMessage_ = builderForValue.Build();
return this;
}
public Builder MergeOptionalMessage(self::TestOptimizedForSize value) {
public Builder MergeOptionalMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
if (result.HasOptionalMessage &&
result.optionalMessage_ != self::TestOptimizedForSize.DefaultInstance) {
result.optionalMessage_ != global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance) {
result.optionalMessage_ =
self::TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial();
global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder(result.optionalMessage_).MergeFrom(value).BuildPartial();
} else {
result.optionalMessage_ = value;
}
......@@ -315,51 +313,51 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public Builder ClearOptionalMessage() {
result.hasOptionalMessage = false;
result.optionalMessage_ = self::TestOptimizedForSize.DefaultInstance;
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance;
return this;
}
// 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_); }
}
public int RepeatedMessageCount {
get { return result.RepeatedMessageCount; }
}
public self::TestOptimizedForSize GetRepeatedMessage(int index) {
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize GetRepeatedMessage(int 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;
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();
return this;
}
public Builder AddRepeatedMessage(self::TestOptimizedForSize value) {
if (result.repeatedMessage_ == pbc::Lists<self::TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<self::TestOptimizedForSize>();
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize value) {
if (result.repeatedMessage_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
}
result.repeatedMessage_.Add(value);
return this;
}
public Builder AddRepeatedMessage(self::TestOptimizedForSize.Builder builderForValue) {
if (result.repeatedMessage_ == pbc::Lists<self::TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<self::TestOptimizedForSize>();
public Builder AddRepeatedMessage(global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder builderForValue) {
if (result.repeatedMessage_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
}
result.repeatedMessage_.Add(builderForValue.Build());
return this;
}
public Builder AddRangeRepeatedMessage(scg::IEnumerable<self::TestOptimizedForSize> values) {
if (result.repeatedMessage_ == pbc::Lists<self::TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<self::TestOptimizedForSize>();
public Builder AddRangeRepeatedMessage(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize> values) {
if (result.repeatedMessage_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty) {
result.repeatedMessage_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>();
}
base.AddRange(values, result.repeatedMessage_);
return this;
}
public Builder ClearRepeatedMessage() {
result.repeatedMessage_ = pbc::Lists<self::TestOptimizedForSize>.Empty;
result.repeatedMessage_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize>.Empty;
return this;
}
}
......
......@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestImportProtoFile {
......@@ -42,8 +40,8 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_import_ImportMessage__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_import_ImportMessage__Descriptor,
new string[] { "D", },
typeof (self::ImportMessage),
typeof (self::ImportMessage.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.ImportMessage),
typeof (global::Google.ProtocolBuffers.TestProtos.ImportMessage.Builder));
#endregion
}
......@@ -69,11 +67,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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;
......@@ -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();
}
public static self::ImportMessage ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::ImportMessage ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::ImportMessage ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.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();
}
public static self::ImportMessage ParseFrom(pb::CodedInputStream input,
public static global::Google.ProtocolBuffers.TestProtos.ImportMessage ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -151,26 +149,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::ImportMessage.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.ImportMessage.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::ImportMessage();
result = new global::Google.ProtocolBuffers.TestProtos.ImportMessage();
return this;
}
......@@ -179,30 +177,30 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::ImportMessage.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.Descriptor; }
}
public override self::ImportMessage DefaultInstanceForType {
get { return self::ImportMessage.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.ImportMessage DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance; }
}
public override self::ImportMessage BuildPartial() {
self::ImportMessage returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.ImportMessage BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.ImportMessage returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::ImportMessage) {
return MergeFrom((self::ImportMessage) other);
if (other is global::Google.ProtocolBuffers.TestProtos.ImportMessage) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.ImportMessage) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::ImportMessage other) {
if (other == self::ImportMessage.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.ImportMessage other) {
if (other == global::Google.ProtocolBuffers.TestProtos.ImportMessage.DefaultInstance) return this;
if (other.HasD) {
D = other.D;
}
......
......@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestMessageSetProtoFile {
......@@ -63,43 +61,43 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSet__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSet__Descriptor,
new string[] { },
typeof (self::TestMessageSet),
typeof (self::TestMessageSet.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSet),
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor
= Descriptor.MessageTypes[1];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetContainer__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetContainer__Descriptor,
new string[] { "MessageSet", },
typeof (self::TestMessageSetContainer),
typeof (self::TestMessageSetContainer.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer),
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor
= Descriptor.MessageTypes[2];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension1__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension1__Descriptor,
new string[] { "I", },
typeof (self::TestMessageSetExtension1),
typeof (self::TestMessageSetExtension1.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1),
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor
= Descriptor.MessageTypes[3];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestMessageSetExtension2__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestMessageSetExtension2__Descriptor,
new string[] { "Str", },
typeof (self::TestMessageSetExtension2),
typeof (self::TestMessageSetExtension2.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2),
typeof (global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet__Descriptor
= Descriptor.MessageTypes[4];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet__Descriptor,
new string[] { "Item", },
typeof (self::RawMessageSet),
typeof (self::RawMessageSet.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet),
typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Builder));
internal static readonly pbd::MessageDescriptor internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor
= internal__static_protobuf_unittest_RawMessageSet__Descriptor.NestedTypes[0];
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_RawMessageSet_Item__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_RawMessageSet_Item__Descriptor,
new string[] { "TypeId", "Message", },
typeof (self::RawMessageSet.Types.Item),
typeof (self::RawMessageSet.Types.Item.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item),
typeof (global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder));
#endregion
}
......@@ -119,11 +117,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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 {
......@@ -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();
}
public static self::TestMessageSet ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSet ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::TestMessageSet ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSet ParseFrom(pb::CodedInputStream input) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSet ParseFrom(pb::CodedInputStream input) {
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) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -189,26 +187,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::TestMessageSet.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::TestMessageSet();
result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSet();
return this;
}
......@@ -217,30 +215,30 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSet.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Descriptor; }
}
public override self::TestMessageSet DefaultInstanceForType {
get { return self::TestMessageSet.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSet DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance; }
}
public override self::TestMessageSet BuildPartial() {
self::TestMessageSet returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSet BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.TestMessageSet returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSet) {
return MergeFrom((self::TestMessageSet) other);
if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSet) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSet) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::TestMessageSet other) {
if (other == self::TestMessageSet.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSet other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance) return this;
this.MergeUnknownFields(other.UnknownFields);
return this;
}
......@@ -284,20 +282,20 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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;
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 {
get { return hasMessageSet; }
}
public self::TestMessageSet MessageSet {
public global::Google.ProtocolBuffers.TestProtos.TestMessageSet MessageSet {
get { return messageSet_; }
}
......@@ -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();
}
public static self::TestMessageSetContainer ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::TestMessageSetContainer ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetContainer ParseFrom(pb::CodedInputStream input) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer ParseFrom(pb::CodedInputStream input) {
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) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -369,26 +367,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::TestMessageSetContainer.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::TestMessageSetContainer();
result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer();
return this;
}
......@@ -397,30 +395,30 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetContainer.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.Descriptor; }
}
public override self::TestMessageSetContainer DefaultInstanceForType {
get { return self::TestMessageSetContainer.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.DefaultInstance; }
}
public override self::TestMessageSetContainer BuildPartial() {
self::TestMessageSetContainer returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSetContainer) {
return MergeFrom((self::TestMessageSetContainer) other);
if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::TestMessageSetContainer other) {
if (other == self::TestMessageSetContainer.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetContainer.DefaultInstance) return this;
if (other.HasMessageSet) {
MergeMessageSet(other.MessageSet);
}
......@@ -450,7 +448,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break;
}
case 10: {
self::TestMessageSet.Builder subBuilder = self::TestMessageSet.CreateBuilder();
global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder subBuilder = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder();
if (HasMessageSet) {
subBuilder.MergeFrom(MessageSet);
}
......@@ -467,25 +465,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasMessageSet {
get { return result.HasMessageSet; }
}
public self::TestMessageSet MessageSet {
public global::Google.ProtocolBuffers.TestProtos.TestMessageSet MessageSet {
get { return result.MessageSet; }
set { SetMessageSet(value); }
}
public Builder SetMessageSet(self::TestMessageSet value) {
public Builder SetMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet value) {
result.hasMessageSet = true;
result.messageSet_ = value;
return this;
}
public Builder SetMessageSet(self::TestMessageSet.Builder builderForValue) {
public Builder SetMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet.Builder builderForValue) {
result.hasMessageSet = true;
result.messageSet_ = builderForValue.Build();
return this;
}
public Builder MergeMessageSet(self::TestMessageSet value) {
public Builder MergeMessageSet(global::Google.ProtocolBuffers.TestProtos.TestMessageSet value) {
if (result.HasMessageSet &&
result.messageSet_ != self::TestMessageSet.DefaultInstance) {
result.messageSet_ != global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance) {
result.messageSet_ =
self::TestMessageSet.CreateBuilder(result.messageSet_).MergeFrom(value).BuildPartial();
global::Google.ProtocolBuffers.TestProtos.TestMessageSet.CreateBuilder(result.messageSet_).MergeFrom(value).BuildPartial();
} else {
result.messageSet_ = value;
}
......@@ -494,7 +492,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public Builder ClearMessageSet() {
result.hasMessageSet = false;
result.messageSet_ = self::TestMessageSet.DefaultInstance;
result.messageSet_ = global::Google.ProtocolBuffers.TestProtos.TestMessageSet.DefaultInstance;
return this;
}
}
......@@ -511,15 +509,15 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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 =
pb::GeneratedSingleExtension<self::TestMessageSetExtension1>.CreateInstance(Descriptor.Extensions[0]);
public static readonly pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1> MessageSetExtension =
pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1>.CreateInstance(Descriptor.Extensions[0]);
#region Nested types
public static class Types {
}
......@@ -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();
}
public static self::TestMessageSetExtension1 ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::TestMessageSetExtension1 ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 ParseFrom(pb::CodedInputStream input) {
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) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -600,26 +598,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::TestMessageSetExtension1.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::TestMessageSetExtension1();
result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1();
return this;
}
......@@ -628,30 +626,30 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetExtension1.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.Descriptor; }
}
public override self::TestMessageSetExtension1 DefaultInstanceForType {
get { return self::TestMessageSetExtension1.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.DefaultInstance; }
}
public override self::TestMessageSetExtension1 BuildPartial() {
self::TestMessageSetExtension1 returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSetExtension1) {
return MergeFrom((self::TestMessageSetExtension1) other);
if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::TestMessageSetExtension1 other) {
if (other == self::TestMessageSetExtension1.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1 other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension1.DefaultInstance) return this;
if (other.HasI) {
I = other.I;
}
......@@ -721,15 +719,15 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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 =
pb::GeneratedSingleExtension<self::TestMessageSetExtension2>.CreateInstance(Descriptor.Extensions[0]);
public static readonly pb::GeneratedExtensionBase<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2> MessageSetExtension =
pb::GeneratedSingleExtension<global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2>.CreateInstance(Descriptor.Extensions[0]);
#region Nested types
public static class Types {
}
......@@ -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();
}
public static self::TestMessageSetExtension2 ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::TestMessageSetExtension2 ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input) {
public static global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 ParseFrom(pb::CodedInputStream input) {
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) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -810,26 +808,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::TestMessageSetExtension2.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::TestMessageSetExtension2();
result = new global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2();
return this;
}
......@@ -838,30 +836,30 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestMessageSetExtension2.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.Descriptor; }
}
public override self::TestMessageSetExtension2 DefaultInstanceForType {
get { return self::TestMessageSetExtension2.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.DefaultInstance; }
}
public override self::TestMessageSetExtension2 BuildPartial() {
self::TestMessageSetExtension2 returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::TestMessageSetExtension2) {
return MergeFrom((self::TestMessageSetExtension2) other);
if (other is global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::TestMessageSetExtension2 other) {
if (other == self::TestMessageSetExtension2.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2 other) {
if (other == global::Google.ProtocolBuffers.TestProtos.TestMessageSetExtension2.DefaultInstance) return this;
if (other.HasStr) {
Str = other.Str;
}
......@@ -931,11 +929,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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
......@@ -951,11 +949,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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;
......@@ -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();
}
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::RawMessageSet.Types.Item ParseFrom(byte[] data,
public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(byte[] data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet.Types.Item ParseFrom(global::System.IO.Stream input) {
public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item ParseFrom(global::System.IO.Stream input) {
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,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.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();
}
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) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -1051,26 +1049,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::RawMessageSet.Types.Item.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::RawMessageSet.Types.Item();
result = new global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item();
return this;
}
......@@ -1079,30 +1077,30 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
get { return self::RawMessageSet.Types.Item.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.DefaultInstance; }
}
public override self::RawMessageSet.Types.Item BuildPartial() {
self::RawMessageSet.Types.Item returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item returnMe = result;
result = null;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::RawMessageSet.Types.Item) {
return MergeFrom((self::RawMessageSet.Types.Item) other);
if (other is global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::RawMessageSet.Types.Item other) {
if (other == self::RawMessageSet.Types.Item.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item other) {
if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.DefaultInstance) return this;
if (other.HasTypeId) {
TypeId = other.TypeId;
}
......@@ -1191,20 +1189,20 @@ namespace Google.ProtocolBuffers.TestProtos {
#endregion
// repeated group Item = 1 {
private scg::IList<self::RawMessageSet.Types.Item> item_ = pbc::Lists<self::RawMessageSet.Types.Item>.Empty;
public scg::IList<self::RawMessageSet.Types.Item> ItemList {
private scg::IList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> item_ = pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty;
public scg::IList<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> ItemList {
get { return item_; }
}
public int ItemCount
{ 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];
}
public override bool IsInitialized {
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;
}
return true;
......@@ -1212,7 +1210,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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);
}
UnknownFields.WriteTo(output);
......@@ -1225,7 +1223,7 @@ namespace Google.ProtocolBuffers.TestProtos {
if (size != -1) return size;
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 += UnknownFields.SerializedSize;
......@@ -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();
}
public static self::RawMessageSet ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::RawMessageSet ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
}
public static self::RawMessageSet ParseFrom(pb::CodedInputStream input) {
public static global::Google.ProtocolBuffers.TestProtos.RawMessageSet ParseFrom(pb::CodedInputStream input) {
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) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -1270,26 +1268,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::RawMessageSet.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.RawMessageSet.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::RawMessageSet();
result = new global::Google.ProtocolBuffers.TestProtos.RawMessageSet();
return this;
}
......@@ -1298,36 +1296,36 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::RawMessageSet.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Descriptor; }
}
public override self::RawMessageSet DefaultInstanceForType {
get { return self::RawMessageSet.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance; }
}
public override self::RawMessageSet BuildPartial() {
if (result.item_ != pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = pbc::Lists<self::RawMessageSet.Types.Item>.AsReadOnly(result.item_);
public override global::Google.ProtocolBuffers.TestProtos.RawMessageSet BuildPartial() {
if (result.item_ != pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
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;
return returnMe;
}
public override Builder MergeFrom(pb::IMessage other) {
if (other is self::RawMessageSet) {
return MergeFrom((self::RawMessageSet) other);
if (other is global::Google.ProtocolBuffers.TestProtos.RawMessageSet) {
return MergeFrom((global::Google.ProtocolBuffers.TestProtos.RawMessageSet) other);
} else {
base.MergeFrom(other);
return this;
}
}
public override Builder MergeFrom(self::RawMessageSet other) {
if (other == self::RawMessageSet.DefaultInstance) return this;
public override Builder MergeFrom(global::Google.ProtocolBuffers.TestProtos.RawMessageSet other) {
if (other == global::Google.ProtocolBuffers.TestProtos.RawMessageSet.DefaultInstance) return this;
if (other.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_);
}
......@@ -1357,7 +1355,7 @@ namespace Google.ProtocolBuffers.TestProtos {
break;
}
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);
AddItem(subBuilder.BuildPartial());
break;
......@@ -1368,46 +1366,46 @@ namespace Google.ProtocolBuffers.TestProtos {
// 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_); }
}
public int 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);
}
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;
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();
return this;
}
public Builder AddItem(self::RawMessageSet.Types.Item value) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>();
public Builder AddItem(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item value) {
if (result.item_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
}
result.item_.Add(value);
return this;
}
public Builder AddItem(self::RawMessageSet.Types.Item.Builder builderForValue) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>();
public Builder AddItem(global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item.Builder builderForValue) {
if (result.item_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
}
result.item_.Add(builderForValue.Build());
return this;
}
public Builder AddRangeItem(scg::IEnumerable<self::RawMessageSet.Types.Item> values) {
if (result.item_ == pbc::Lists<self::RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<self::RawMessageSet.Types.Item>();
public Builder AddRangeItem(scg::IEnumerable<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item> values) {
if (result.item_ == pbc::Lists<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>.Empty) {
result.item_ = new scg::List<global::Google.ProtocolBuffers.TestProtos.RawMessageSet.Types.Item>();
}
base.AddRange(values, result.item_);
return this;
}
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;
}
}
......
......@@ -4,8 +4,6 @@ using pb = global::Google.ProtocolBuffers;
using pbc = global::Google.ProtocolBuffers.Collections;
using pbd = global::Google.ProtocolBuffers.Descriptors;
using scg = global::System.Collections.Generic;
using self = global::Google.ProtocolBuffers.TestProtos;
namespace Google.ProtocolBuffers.TestProtos {
public static partial class UnitTestOptimizeForProtoFile {
......@@ -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,
0x72, 0x6f, 0x74, 0x6f, 0x46, 0x69, 0x6c, 0x65,
}, new pbd::FileDescriptor[] {
self::UnitTestProtoFile.Descriptor,
global::Google.ProtocolBuffers.TestProtos.UnitTestProtoFile.Descriptor,
});
#endregion
......@@ -47,8 +45,8 @@ namespace Google.ProtocolBuffers.TestProtos {
internal static pb::FieldAccess.FieldAccessorTable internal__static_protobuf_unittest_TestOptimizedForSize__FieldAccessorTable
= new pb::FieldAccess.FieldAccessorTable(internal__static_protobuf_unittest_TestOptimizedForSize__Descriptor,
new string[] { "I", "Msg", },
typeof (self::TestOptimizedForSize),
typeof (self::TestOptimizedForSize.Builder));
typeof (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize),
typeof (global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Builder));
#endregion
}
......@@ -68,11 +66,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
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 {
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 =
......@@ -94,43 +92,43 @@ namespace Google.ProtocolBuffers.TestProtos {
// optional .protobuf_unittest.ForeignMessage msg = 19;
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 {
get { return hasMsg; }
}
public self::ForeignMessage Msg {
public global::Google.ProtocolBuffers.TestProtos.ForeignMessage 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();
}
public static self::TestOptimizedForSize ParseFrom(pb::ByteString data,
public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::ByteString data,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.BuildParsed();
}
public static self::TestOptimizedForSize ParseFrom(byte[] data) {
public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(byte[] data) {
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) {
return ((Builder) CreateBuilder().MergeFrom(data, extensionRegistry))
.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();
}
public static self::TestOptimizedForSize ParseFrom(
public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(
global::System.IO.Stream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.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();
}
public static self::TestOptimizedForSize ParseFrom(pb::CodedInputStream input,
public static global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize ParseFrom(pb::CodedInputStream input,
pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry))
.BuildParsed();
......@@ -138,26 +136,26 @@ namespace Google.ProtocolBuffers.TestProtos {
public static Builder CreateBuilder() { 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);
}
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 {
get { return this; }
}
// Construct using self::TestOptimizedForSize.CreateBuilder()
// Construct using global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.CreateBuilder()
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; }
}
public override Builder Clear() {
result = new self::TestOptimizedForSize();
result = new global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize();
return this;
}
......@@ -166,15 +164,15 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override pbd::MessageDescriptor DescriptorForType {
get { return self::TestOptimizedForSize.Descriptor; }
get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.Descriptor; }
}
public override self::TestOptimizedForSize DefaultInstanceForType {
get { return self::TestOptimizedForSize.DefaultInstance; }
public override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize DefaultInstanceForType {
get { return global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; }
}
public override self::TestOptimizedForSize BuildPartial() {
self::TestOptimizedForSize returnMe = result;
public override global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize BuildPartial() {
global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize returnMe = result;
result = null;
return returnMe;
}
......@@ -203,25 +201,25 @@ namespace Google.ProtocolBuffers.TestProtos {
public bool HasMsg {
get { return result.HasMsg; }
}
public self::ForeignMessage Msg {
public global::Google.ProtocolBuffers.TestProtos.ForeignMessage Msg {
get { return result.Msg; }
set { SetMsg(value); }
}
public Builder SetMsg(self::ForeignMessage value) {
public Builder SetMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
result.hasMsg = true;
result.msg_ = value;
return this;
}
public Builder SetMsg(self::ForeignMessage.Builder builderForValue) {
public Builder SetMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage.Builder builderForValue) {
result.hasMsg = true;
result.msg_ = builderForValue.Build();
return this;
}
public Builder MergeMsg(self::ForeignMessage value) {
public Builder MergeMsg(global::Google.ProtocolBuffers.TestProtos.ForeignMessage value) {
if (result.HasMsg &&
result.msg_ != self::ForeignMessage.DefaultInstance) {
result.msg_ != global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance) {
result.msg_ =
self::ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial();
global::Google.ProtocolBuffers.TestProtos.ForeignMessage.CreateBuilder(result.msg_).MergeFrom(value).BuildPartial();
} else {
result.msg_ = value;
}
......@@ -230,7 +228,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public Builder ClearMsg() {
result.hasMsg = false;
result.msg_ = self::ForeignMessage.DefaultInstance;
result.msg_ = global::Google.ProtocolBuffers.TestProtos.ForeignMessage.DefaultInstance;
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) {
printer->Print("using scg = global::System.Collections.Generic;\r\n");
if (!csharp_namespace_.empty()) {
printer->Print("using self = global::$selfnamespace$;\r\n\r\n",
"selfnamespace", csharp_namespace_);
printer->Print(
"namespace $namespace$ {\r\n",
"namespace", csharp_namespace_);
......@@ -238,8 +236,6 @@ static void GenerateSibling(const string& csharp_namespace,
printer.Print("using scg = global::System.Collections.Generic;\r\n");
if (!csharp_namespace.empty()) {
printer.Print("using self = global::$selfnamespace$;\r\n\r\n",
"selfnamespace", csharp_namespace);
printer.Print(
"namespace $namespace$ {\r\n",
"namespace", csharp_namespace);
......
......@@ -138,7 +138,7 @@ string FileCSharpNamespace(const FileDescriptor* file) {
string ToCSharpName(const string& full_name, const FileDescriptor* file) {
string result;
if (!file->options().csharp_nest_classes()) {
result = "";
result = FileCSharpNamespace(file);
} else {
result = ClassName(file);
}
......@@ -150,17 +150,18 @@ string ToCSharpName(const string& full_name, const FileDescriptor* file) {
classname = full_name;
} else {
// 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);
}
result += StringReplace(classname, ".", ".Types.", true);
const char *prefix = FileCSharpNamespace(file).empty() ? "global::" : "self::";
return prefix + result;
return "global::" + result;
}
string ClassName(const FileDescriptor* descriptor) {
string alias = FileCSharpNamespace(descriptor).empty() ? "global::" : "self::";
return alias + FileClassName(descriptor);
string result = FileCSharpNamespace(descriptor);
if (!result.empty()) result += '.';
result += FileClassName(descriptor);
return "global::" + result;
}
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