Commit a314d4c9 authored by csharptest's avatar csharptest Committed by rogerk

Regenerated code with changes

parent dc24b605
This diff is collapsed.
......@@ -60,7 +60,7 @@ namespace Google.ProtocolBuffers.TestProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class OptionsMessage : pb::GeneratedMessage<OptionsMessage, OptionsMessage.Builder> {
private static readonly OptionsMessage defaultInstance = new Builder().BuildPartial();
private static readonly OptionsMessage defaultInstance = new OptionsMessage().MakeReadOnly();
private static readonly string[] _optionsMessageFieldNames = new string[] { "customized", "normal", "options_message" };
private static readonly uint[] _optionsMessageFieldTags = new uint[] { 26, 10, 18 };
public static OptionsMessage DefaultInstance {
......@@ -68,7 +68,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override OptionsMessage DefaultInstanceForType {
get { return defaultInstance; }
get { return DefaultInstance; }
}
protected override OptionsMessage ThisMessage {
......@@ -186,6 +186,10 @@ namespace Google.ProtocolBuffers.TestProtos {
public static OptionsMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
private OptionsMessage MakeReadOnly() {
return this;
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
......@@ -201,22 +205,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { return this; }
}
public Builder() {
result = DefaultInstance ?? new OptionsMessage();
builderIsReadOnly = result == DefaultInstance;
result = DefaultInstance;
resultIsReadOnly = true;
}
internal Builder(OptionsMessage cloneFrom) {
result = cloneFrom;
builderIsReadOnly = true;
resultIsReadOnly = true;
}
bool builderIsReadOnly;
OptionsMessage result;
private bool resultIsReadOnly;
private OptionsMessage result;
private OptionsMessage PrepareBuilder() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
OptionsMessage original = result;
result = new OptionsMessage();
builderIsReadOnly = false;
resultIsReadOnly = false;
MergeFrom(original);
}
return result;
......@@ -231,13 +235,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override Builder Clear() {
result = DefaultInstance ?? new OptionsMessage();
builderIsReadOnly = true;
result = DefaultInstance;
resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return new Builder(result);
} else {
return new Builder().MergeFrom(result);
......@@ -253,11 +257,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override OptionsMessage BuildPartial() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return result;
}
builderIsReadOnly = true;
return result;
resultIsReadOnly = true;
return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
......
......@@ -64,7 +64,7 @@ namespace Google.ProtocolBuffers.TestProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestEmbedOptimizedForSize : pb::GeneratedMessage<TestEmbedOptimizedForSize, TestEmbedOptimizedForSize.Builder> {
private static readonly TestEmbedOptimizedForSize defaultInstance = new Builder().BuildPartial();
private static readonly TestEmbedOptimizedForSize defaultInstance = new TestEmbedOptimizedForSize().MakeReadOnly();
private static readonly string[] _testEmbedOptimizedForSizeFieldNames = new string[] { "optional_message", "repeated_message" };
private static readonly uint[] _testEmbedOptimizedForSizeFieldTags = new uint[] { 10, 18 };
public static TestEmbedOptimizedForSize DefaultInstance {
......@@ -72,7 +72,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override TestEmbedOptimizedForSize DefaultInstanceForType {
get { return defaultInstance; }
get { return DefaultInstance; }
}
protected override TestEmbedOptimizedForSize ThisMessage {
......@@ -89,12 +89,12 @@ namespace Google.ProtocolBuffers.TestProtos {
public const int OptionalMessageFieldNumber = 1;
private bool hasOptionalMessage;
private global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance;
private global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize optionalMessage_;
public bool HasOptionalMessage {
get { return hasOptionalMessage; }
}
public global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize OptionalMessage {
get { return optionalMessage_; }
get { return optionalMessage_ ?? global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance; }
}
public const int RepeatedMessageFieldNumber = 2;
......@@ -182,6 +182,11 @@ namespace Google.ProtocolBuffers.TestProtos {
public static TestEmbedOptimizedForSize ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
private TestEmbedOptimizedForSize MakeReadOnly() {
repeatedMessage_.MakeReadOnly();
return this;
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
......@@ -197,22 +202,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { return this; }
}
public Builder() {
result = DefaultInstance ?? new TestEmbedOptimizedForSize();
builderIsReadOnly = result == DefaultInstance;
result = DefaultInstance;
resultIsReadOnly = true;
}
internal Builder(TestEmbedOptimizedForSize cloneFrom) {
result = cloneFrom;
builderIsReadOnly = true;
resultIsReadOnly = true;
}
bool builderIsReadOnly;
TestEmbedOptimizedForSize result;
private bool resultIsReadOnly;
private TestEmbedOptimizedForSize result;
private TestEmbedOptimizedForSize PrepareBuilder() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
TestEmbedOptimizedForSize original = result;
result = new TestEmbedOptimizedForSize();
builderIsReadOnly = false;
resultIsReadOnly = false;
MergeFrom(original);
}
return result;
......@@ -227,13 +232,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override Builder Clear() {
result = DefaultInstance ?? new TestEmbedOptimizedForSize();
builderIsReadOnly = true;
result = DefaultInstance;
resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return new Builder(result);
} else {
return new Builder().MergeFrom(result);
......@@ -249,12 +254,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override TestEmbedOptimizedForSize BuildPartial() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return result;
}
result.repeatedMessage_.MakeReadOnly();
builderIsReadOnly = true;
return result;
resultIsReadOnly = true;
return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
......@@ -377,7 +381,7 @@ namespace Google.ProtocolBuffers.TestProtos {
public Builder ClearOptionalMessage() {
PrepareBuilder();
result.hasOptionalMessage = false;
result.optionalMessage_ = global::Google.ProtocolBuffers.TestProtos.TestOptimizedForSize.DefaultInstance;
result.optionalMessage_ = null;
return this;
}
......
......@@ -43,7 +43,7 @@ namespace Google.ProtocolBuffers.TestProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ImportMessageLite : pb::GeneratedMessageLite<ImportMessageLite, ImportMessageLite.Builder> {
private static readonly ImportMessageLite defaultInstance = new Builder().BuildPartial();
private static readonly ImportMessageLite defaultInstance = new ImportMessageLite().MakeReadOnly();
private static readonly string[] _importMessageLiteFieldNames = new string[] { "d" };
private static readonly uint[] _importMessageLiteFieldTags = new uint[] { 8 };
public static ImportMessageLite DefaultInstance {
......@@ -51,7 +51,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override ImportMessageLite DefaultInstanceForType {
get { return defaultInstance; }
get { return DefaultInstance; }
}
protected override ImportMessageLite ThisMessage {
......@@ -146,6 +146,10 @@ namespace Google.ProtocolBuffers.TestProtos {
public static ImportMessageLite ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
private ImportMessageLite MakeReadOnly() {
return this;
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
......@@ -161,22 +165,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { return this; }
}
public Builder() {
result = DefaultInstance ?? new ImportMessageLite();
builderIsReadOnly = result == DefaultInstance;
result = DefaultInstance;
resultIsReadOnly = true;
}
internal Builder(ImportMessageLite cloneFrom) {
result = cloneFrom;
builderIsReadOnly = true;
resultIsReadOnly = true;
}
bool builderIsReadOnly;
ImportMessageLite result;
private bool resultIsReadOnly;
private ImportMessageLite result;
private ImportMessageLite PrepareBuilder() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
ImportMessageLite original = result;
result = new ImportMessageLite();
builderIsReadOnly = false;
resultIsReadOnly = false;
MergeFrom(original);
}
return result;
......@@ -191,13 +195,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override Builder Clear() {
result = DefaultInstance ?? new ImportMessageLite();
builderIsReadOnly = true;
result = DefaultInstance;
resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return new Builder(result);
} else {
return new Builder().MergeFrom(result);
......@@ -209,11 +213,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override ImportMessageLite BuildPartial() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return result;
}
builderIsReadOnly = true;
return result;
resultIsReadOnly = true;
return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessageLite other) {
......
......@@ -71,7 +71,7 @@ namespace Google.ProtocolBuffers.TestProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class ImportMessage : pb::GeneratedMessage<ImportMessage, ImportMessage.Builder> {
private static readonly ImportMessage defaultInstance = new Builder().BuildPartial();
private static readonly ImportMessage defaultInstance = new ImportMessage().MakeReadOnly();
private static readonly string[] _importMessageFieldNames = new string[] { "d" };
private static readonly uint[] _importMessageFieldTags = new uint[] { 8 };
public static ImportMessage DefaultInstance {
......@@ -79,7 +79,7 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override ImportMessage DefaultInstanceForType {
get { return defaultInstance; }
get { return DefaultInstance; }
}
protected override ImportMessage ThisMessage {
......@@ -165,6 +165,10 @@ namespace Google.ProtocolBuffers.TestProtos {
public static ImportMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
private ImportMessage MakeReadOnly() {
return this;
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
......@@ -180,22 +184,22 @@ namespace Google.ProtocolBuffers.TestProtos {
get { return this; }
}
public Builder() {
result = DefaultInstance ?? new ImportMessage();
builderIsReadOnly = result == DefaultInstance;
result = DefaultInstance;
resultIsReadOnly = true;
}
internal Builder(ImportMessage cloneFrom) {
result = cloneFrom;
builderIsReadOnly = true;
resultIsReadOnly = true;
}
bool builderIsReadOnly;
ImportMessage result;
private bool resultIsReadOnly;
private ImportMessage result;
private ImportMessage PrepareBuilder() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
ImportMessage original = result;
result = new ImportMessage();
builderIsReadOnly = false;
resultIsReadOnly = false;
MergeFrom(original);
}
return result;
......@@ -210,13 +214,13 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override Builder Clear() {
result = DefaultInstance ?? new ImportMessage();
builderIsReadOnly = true;
result = DefaultInstance;
resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return new Builder(result);
} else {
return new Builder().MergeFrom(result);
......@@ -232,11 +236,11 @@ namespace Google.ProtocolBuffers.TestProtos {
}
public override ImportMessage BuildPartial() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return result;
}
builderIsReadOnly = true;
return result;
resultIsReadOnly = true;
return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
......
......@@ -81,7 +81,7 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class TestMessage : pb::ExtendableMessage<TestMessage, TestMessage.Builder> {
private static readonly TestMessage defaultInstance = new Builder().BuildPartial();
private static readonly TestMessage defaultInstance = new TestMessage().MakeReadOnly();
private static readonly string[] _testMessageFieldNames = new string[] { "a" };
private static readonly uint[] _testMessageFieldTags = new uint[] { 8 };
public static TestMessage DefaultInstance {
......@@ -89,7 +89,7 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
}
public override TestMessage DefaultInstanceForType {
get { return defaultInstance; }
get { return DefaultInstance; }
}
protected override TestMessage ThisMessage {
......@@ -179,6 +179,10 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
public static TestMessage ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
private TestMessage MakeReadOnly() {
return this;
}
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
......@@ -194,22 +198,22 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
get { return this; }
}
public Builder() {
result = DefaultInstance ?? new TestMessage();
builderIsReadOnly = result == DefaultInstance;
result = DefaultInstance;
resultIsReadOnly = true;
}
internal Builder(TestMessage cloneFrom) {
result = cloneFrom;
builderIsReadOnly = true;
resultIsReadOnly = true;
}
bool builderIsReadOnly;
TestMessage result;
private bool resultIsReadOnly;
private TestMessage result;
private TestMessage PrepareBuilder() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
TestMessage original = result;
result = new TestMessage();
builderIsReadOnly = false;
resultIsReadOnly = false;
MergeFrom(original);
}
return result;
......@@ -224,13 +228,13 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
}
public override Builder Clear() {
result = DefaultInstance ?? new TestMessage();
builderIsReadOnly = true;
result = DefaultInstance;
resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return new Builder(result);
} else {
return new Builder().MergeFrom(result);
......@@ -246,11 +250,11 @@ namespace Google.ProtocolBuffers.TestProtos.NoGenericService {
}
public override TestMessage BuildPartial() {
if (builderIsReadOnly) {
if (resultIsReadOnly) {
return result;
}
builderIsReadOnly = true;
return result;
resultIsReadOnly = true;
return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
......
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