aboutsummaryrefslogtreecommitdiff
path: root/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs')
-rw-r--r--src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs386
1 files changed, 297 insertions, 89 deletions
diff --git a/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs b/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
index 853b0e7d..4eb9c05d 100644
--- a/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
+++ b/src/ProtocolBuffers/DescriptorProtos/CSharpOptions.cs
@@ -1,5 +1,5 @@
// Generated by ProtoGen, Version=2.3.0.277, Culture=neutral, PublicKeyToken=17b3b1f090c3ea48. DO NOT EDIT!
-#pragma warning disable 1591
+#pragma warning disable 1591, 0612
#region Designer generated code
using pb = global::Google.ProtocolBuffers;
@@ -52,36 +52,37 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
byte[] descriptorData = global::System.Convert.FromBase64String(
"CiRnb29nbGUvcHJvdG9idWYvY3NoYXJwX29wdGlvbnMucHJvdG8SD2dvb2ds" +
"ZS5wcm90b2J1ZhogZ29vZ2xlL3Byb3RvYnVmL2Rlc2NyaXB0b3IucHJvdG8i" +
- "tgMKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" +
+ "1wMKEUNTaGFycEZpbGVPcHRpb25zEhEKCW5hbWVzcGFjZRgBIAEoCRIaChJ1" +
"bWJyZWxsYV9jbGFzc25hbWUYAiABKAkSHAoOcHVibGljX2NsYXNzZXMYAyAB" +
"KAg6BHRydWUSFgoObXVsdGlwbGVfZmlsZXMYBCABKAgSFAoMbmVzdF9jbGFz" +
"c2VzGAUgASgIEhYKDmNvZGVfY29udHJhY3RzGAYgASgIEiQKHGV4cGFuZF9u" +
"YW1lc3BhY2VfZGlyZWN0b3JpZXMYByABKAgSHAoOY2xzX2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LnBy" +
+ "b3RvYnVmLkNTaGFycEZpZWxkT3B0aW9uczpnChZjc2hhcnBfc2VydmljZV9v" +
+ "cHRpb25zEh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zGOgHIAEo" +
+ "CzIlLmdvb2dsZS5wcm90b2J1Zi5DU2hhcnBTZXJ2aWNlT3B0aW9uczpkChVj" +
+ "c2hhcnBfbWV0aG9kX29wdGlvbnMSHi5nb29nbGUucHJvdG9idWYuTWV0aG9k" +
+ "T3B0aW9ucxjoByABKAsyJC5nb29nbGUucHJvdG9idWYuQ1NoYXJwTWV0aG9k" +
+ "T3B0aW9ucw==");
pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) {
descriptor = root;
internal__static_google_protobuf_CSharpFileOptions__Descriptor = Descriptor.MessageTypes[0];
internal__static_google_protobuf_CSharpFileOptions__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions, global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions.Builder>(internal__static_google_protobuf_CSharpFileOptions__Descriptor,
- new string[] { "Namespace", "UmbrellaClassname", "PublicClasses", "MultipleFiles", "NestClasses", "CodeContracts", "ExpandNamespaceDirectories", "ClsCompliance", "FileExtension", "UmbrellaNamespace", "OutputDirectory", "IgnoreGoogleProtobuf", "ServiceGeneratorType", });
+ new string[] { "Namespace", "UmbrellaClassname", "PublicClasses", "MultipleFiles", "NestClasses", "CodeContracts", "ExpandNamespaceDirectories", "ClsCompliance", "AddSerializable", "FileExtension", "UmbrellaNamespace", "OutputDirectory", "IgnoreGoogleProtobuf", "ServiceGeneratorType", });
internal__static_google_protobuf_CSharpFieldOptions__Descriptor = Descriptor.MessageTypes[1];
internal__static_google_protobuf_CSharpFieldOptions__FieldAccessorTable =
new pb::FieldAccess.FieldAccessorTable<global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions, global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions.Builder>(internal__static_google_protobuf_CSharpFieldOptions__Descriptor,
@@ -125,15 +126,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpFileOptions : pb::GeneratedMessage<CSharpFileOptions, CSharpFileOptions.Builder> {
- private static readonly CSharpFileOptions defaultInstance = new Builder().BuildPartial();
- private static readonly string[] _cSharpFileOptionsFieldNames = new string[] { "cls_compliance", "code_contracts", "expand_namespace_directories", "file_extension", "ignore_google_protobuf", "multiple_files", "namespace", "nest_classes", "output_directory", "public_classes", "service_generator_type", "umbrella_classname", "umbrella_namespace" };
- private static readonly uint[] _cSharpFileOptionsFieldTags = new uint[] { 64, 48, 56, 1770, 1792, 32, 10, 40, 1786, 24, 1800, 18, 1778 };
+ private CSharpFileOptions() { }
+ private static readonly CSharpFileOptions defaultInstance = new CSharpFileOptions().MakeReadOnly();
+ private static readonly string[] _cSharpFileOptionsFieldNames = new string[] { "add_serializable", "cls_compliance", "code_contracts", "expand_namespace_directories", "file_extension", "ignore_google_protobuf", "multiple_files", "namespace", "nest_classes", "output_directory", "public_classes", "service_generator_type", "umbrella_classname", "umbrella_namespace" };
+ private static readonly uint[] _cSharpFileOptionsFieldTags = new uint[] { 72, 64, 48, 56, 1770, 1792, 32, 10, 40, 1786, 24, 1800, 18, 1778 };
public static CSharpFileOptions DefaultInstance {
get { return defaultInstance; }
}
public override CSharpFileOptions DefaultInstanceForType {
- get { return defaultInstance; }
+ get { return DefaultInstance; }
}
protected override CSharpFileOptions ThisMessage {
@@ -228,6 +230,16 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
get { return clsCompliance_; }
}
+ public const int AddSerializableFieldNumber = 9;
+ private bool hasAddSerializable;
+ private bool addSerializable_;
+ public bool HasAddSerializable {
+ get { return hasAddSerializable; }
+ }
+ public bool AddSerializable {
+ get { return addSerializable_; }
+ }
+
public const int FileExtensionFieldNumber = 221;
private bool hasFileExtension;
private string fileExtension_ = ".cs";
@@ -288,43 +300,46 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
int size = SerializedSize;
string[] field_names = _cSharpFileOptionsFieldNames;
if (hasNamespace) {
- output.WriteString(1, field_names[6], Namespace);
+ output.WriteString(1, field_names[7], Namespace);
}
if (hasUmbrellaClassname) {
- output.WriteString(2, field_names[11], UmbrellaClassname);
+ output.WriteString(2, field_names[12], UmbrellaClassname);
}
if (hasPublicClasses) {
- output.WriteBool(3, field_names[9], PublicClasses);
+ output.WriteBool(3, field_names[10], PublicClasses);
}
if (hasMultipleFiles) {
- output.WriteBool(4, field_names[5], MultipleFiles);
+ output.WriteBool(4, field_names[6], MultipleFiles);
}
if (hasNestClasses) {
- output.WriteBool(5, field_names[7], NestClasses);
+ output.WriteBool(5, field_names[8], NestClasses);
}
if (hasCodeContracts) {
- output.WriteBool(6, field_names[1], CodeContracts);
+ output.WriteBool(6, field_names[2], CodeContracts);
}
if (hasExpandNamespaceDirectories) {
- output.WriteBool(7, field_names[2], ExpandNamespaceDirectories);
+ output.WriteBool(7, field_names[3], ExpandNamespaceDirectories);
}
if (hasClsCompliance) {
- output.WriteBool(8, field_names[0], ClsCompliance);
+ output.WriteBool(8, field_names[1], ClsCompliance);
+ }
+ if (hasAddSerializable) {
+ output.WriteBool(9, field_names[0], AddSerializable);
}
if (hasFileExtension) {
- output.WriteString(221, field_names[3], FileExtension);
+ output.WriteString(221, field_names[4], FileExtension);
}
if (hasUmbrellaNamespace) {
- output.WriteString(222, field_names[12], UmbrellaNamespace);
+ output.WriteString(222, field_names[13], UmbrellaNamespace);
}
if (hasOutputDirectory) {
- output.WriteString(223, field_names[8], OutputDirectory);
+ output.WriteString(223, field_names[9], OutputDirectory);
}
if (hasIgnoreGoogleProtobuf) {
- output.WriteBool(224, field_names[4], IgnoreGoogleProtobuf);
+ output.WriteBool(224, field_names[5], IgnoreGoogleProtobuf);
}
if (hasServiceGeneratorType) {
- output.WriteEnum(225, field_names[10], (int) ServiceGeneratorType, ServiceGeneratorType);
+ output.WriteEnum(225, field_names[11], (int) ServiceGeneratorType, ServiceGeneratorType);
}
UnknownFields.WriteTo(output);
}
@@ -360,6 +375,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
if (hasClsCompliance) {
size += pb::CodedOutputStream.ComputeBoolSize(8, ClsCompliance);
}
+ if (hasAddSerializable) {
+ size += pb::CodedOutputStream.ComputeBoolSize(9, AddSerializable);
+ }
if (hasFileExtension) {
size += pb::CodedOutputStream.ComputeStringSize(221, FileExtension);
}
@@ -411,11 +429,15 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public static CSharpFileOptions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
+ private CSharpFileOptions MakeReadOnly() {
+ return this;
+ }
+
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(CSharpFileOptions prototype) {
- return (Builder) new Builder().MergeFrom(prototype);
+ return new Builder(prototype);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -425,21 +447,48 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
protected override Builder ThisBuilder {
get { return this; }
}
- public Builder() {}
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(CSharpFileOptions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
+
+ private bool resultIsReadOnly;
+ private CSharpFileOptions result;
+
+ private CSharpFileOptions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ CSharpFileOptions original = result;
+ result = new CSharpFileOptions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
- CSharpFileOptions result = new CSharpFileOptions();
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
protected override CSharpFileOptions MessageBeingBuilt {
- get { return result; }
+ get { return PrepareBuilder(); }
}
public override Builder Clear() {
- result = new CSharpFileOptions();
+ result = DefaultInstance;
+ resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
- return new Builder().MergeFrom(result);
+ if (resultIsReadOnly) {
+ return new Builder(result);
+ } else {
+ return new Builder().MergeFrom(result);
+ }
}
public override pbd::MessageDescriptor DescriptorForType {
@@ -451,12 +500,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override CSharpFileOptions BuildPartial() {
- if (result == null) {
- throw new global::System.InvalidOperationException("build() has already been called on this Builder");
+ if (resultIsReadOnly) {
+ return result;
}
- CSharpFileOptions returnMe = result;
- result = null;
- return returnMe;
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
@@ -470,6 +518,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(CSharpFileOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpFileOptions.DefaultInstance) return this;
+ PrepareBuilder();
if (other.HasNamespace) {
Namespace = other.Namespace;
}
@@ -494,6 +543,9 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
if (other.HasClsCompliance) {
ClsCompliance = other.ClsCompliance;
}
+ if (other.HasAddSerializable) {
+ AddSerializable = other.AddSerializable;
+ }
if (other.HasFileExtension) {
FileExtension = other.FileExtension;
}
@@ -518,6 +570,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
pb::UnknownFieldSet.Builder unknownFields = null;
uint tag;
string field_name;
@@ -583,6 +636,10 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
result.hasClsCompliance = input.ReadBool(ref result.clsCompliance_);
break;
}
+ case 72: {
+ result.hasAddSerializable = input.ReadBool(ref result.addSerializable_);
+ break;
+ }
case 1770: {
result.hasFileExtension = input.ReadString(ref result.fileExtension_);
break;
@@ -630,11 +687,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public Builder SetNamespace(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
result.hasNamespace = true;
result.namespace_ = value;
return this;
}
public Builder ClearNamespace() {
+ PrepareBuilder();
result.hasNamespace = false;
result.namespace_ = "";
return this;
@@ -649,11 +708,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public Builder SetUmbrellaClassname(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
result.hasUmbrellaClassname = true;
result.umbrellaClassname_ = value;
return this;
}
public Builder ClearUmbrellaClassname() {
+ PrepareBuilder();
result.hasUmbrellaClassname = false;
result.umbrellaClassname_ = "";
return this;
@@ -667,11 +728,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetPublicClasses(value); }
}
public Builder SetPublicClasses(bool value) {
+ PrepareBuilder();
result.hasPublicClasses = true;
result.publicClasses_ = value;
return this;
}
public Builder ClearPublicClasses() {
+ PrepareBuilder();
result.hasPublicClasses = false;
result.publicClasses_ = true;
return this;
@@ -685,11 +748,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetMultipleFiles(value); }
}
public Builder SetMultipleFiles(bool value) {
+ PrepareBuilder();
result.hasMultipleFiles = true;
result.multipleFiles_ = value;
return this;
}
public Builder ClearMultipleFiles() {
+ PrepareBuilder();
result.hasMultipleFiles = false;
result.multipleFiles_ = false;
return this;
@@ -703,11 +768,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetNestClasses(value); }
}
public Builder SetNestClasses(bool value) {
+ PrepareBuilder();
result.hasNestClasses = true;
result.nestClasses_ = value;
return this;
}
public Builder ClearNestClasses() {
+ PrepareBuilder();
result.hasNestClasses = false;
result.nestClasses_ = false;
return this;
@@ -721,11 +788,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetCodeContracts(value); }
}
public Builder SetCodeContracts(bool value) {
+ PrepareBuilder();
result.hasCodeContracts = true;
result.codeContracts_ = value;
return this;
}
public Builder ClearCodeContracts() {
+ PrepareBuilder();
result.hasCodeContracts = false;
result.codeContracts_ = false;
return this;
@@ -739,11 +808,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetExpandNamespaceDirectories(value); }
}
public Builder SetExpandNamespaceDirectories(bool value) {
+ PrepareBuilder();
result.hasExpandNamespaceDirectories = true;
result.expandNamespaceDirectories_ = value;
return this;
}
public Builder ClearExpandNamespaceDirectories() {
+ PrepareBuilder();
result.hasExpandNamespaceDirectories = false;
result.expandNamespaceDirectories_ = false;
return this;
@@ -757,16 +828,38 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetClsCompliance(value); }
}
public Builder SetClsCompliance(bool value) {
+ PrepareBuilder();
result.hasClsCompliance = true;
result.clsCompliance_ = value;
return this;
}
public Builder ClearClsCompliance() {
+ PrepareBuilder();
result.hasClsCompliance = false;
result.clsCompliance_ = true;
return this;
}
+ public bool HasAddSerializable {
+ get { return result.hasAddSerializable; }
+ }
+ public bool AddSerializable {
+ get { return result.AddSerializable; }
+ set { SetAddSerializable(value); }
+ }
+ public Builder SetAddSerializable(bool value) {
+ PrepareBuilder();
+ result.hasAddSerializable = true;
+ result.addSerializable_ = value;
+ return this;
+ }
+ public Builder ClearAddSerializable() {
+ PrepareBuilder();
+ result.hasAddSerializable = false;
+ result.addSerializable_ = false;
+ return this;
+ }
+
public bool HasFileExtension {
get { return result.hasFileExtension; }
}
@@ -776,11 +869,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public Builder SetFileExtension(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
result.hasFileExtension = true;
result.fileExtension_ = value;
return this;
}
public Builder ClearFileExtension() {
+ PrepareBuilder();
result.hasFileExtension = false;
result.fileExtension_ = ".cs";
return this;
@@ -795,11 +890,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public Builder SetUmbrellaNamespace(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
result.hasUmbrellaNamespace = true;
result.umbrellaNamespace_ = value;
return this;
}
public Builder ClearUmbrellaNamespace() {
+ PrepareBuilder();
result.hasUmbrellaNamespace = false;
result.umbrellaNamespace_ = "";
return this;
@@ -814,11 +911,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public Builder SetOutputDirectory(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
result.hasOutputDirectory = true;
result.outputDirectory_ = value;
return this;
}
public Builder ClearOutputDirectory() {
+ PrepareBuilder();
result.hasOutputDirectory = false;
result.outputDirectory_ = ".";
return this;
@@ -832,11 +931,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetIgnoreGoogleProtobuf(value); }
}
public Builder SetIgnoreGoogleProtobuf(bool value) {
+ PrepareBuilder();
result.hasIgnoreGoogleProtobuf = true;
result.ignoreGoogleProtobuf_ = value;
return this;
}
public Builder ClearIgnoreGoogleProtobuf() {
+ PrepareBuilder();
result.hasIgnoreGoogleProtobuf = false;
result.ignoreGoogleProtobuf_ = false;
return this;
@@ -850,11 +951,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetServiceGeneratorType(value); }
}
public Builder SetServiceGeneratorType(global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType value) {
+ PrepareBuilder();
result.hasServiceGeneratorType = true;
result.serviceGeneratorType_ = value;
return this;
}
public Builder ClearServiceGeneratorType() {
+ PrepareBuilder();
result.hasServiceGeneratorType = false;
result.serviceGeneratorType_ = global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceType.NONE;
return this;
@@ -869,7 +972,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpFieldOptions : pb::GeneratedMessage<CSharpFieldOptions, CSharpFieldOptions.Builder> {
- private static readonly CSharpFieldOptions defaultInstance = new Builder().BuildPartial();
+ private CSharpFieldOptions() { }
+ private static readonly CSharpFieldOptions defaultInstance = new CSharpFieldOptions().MakeReadOnly();
private static readonly string[] _cSharpFieldOptionsFieldNames = new string[] { "property_name" };
private static readonly uint[] _cSharpFieldOptionsFieldTags = new uint[] { 10 };
public static CSharpFieldOptions DefaultInstance {
@@ -877,7 +981,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override CSharpFieldOptions DefaultInstanceForType {
- get { return defaultInstance; }
+ get { return DefaultInstance; }
}
protected override CSharpFieldOptions ThisMessage {
@@ -963,11 +1067,15 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public static CSharpFieldOptions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
+ private CSharpFieldOptions MakeReadOnly() {
+ return this;
+ }
+
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(CSharpFieldOptions prototype) {
- return (Builder) new Builder().MergeFrom(prototype);
+ return new Builder(prototype);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -977,21 +1085,48 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
protected override Builder ThisBuilder {
get { return this; }
}
- public Builder() {}
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(CSharpFieldOptions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
- CSharpFieldOptions result = new CSharpFieldOptions();
+ private bool resultIsReadOnly;
+ private CSharpFieldOptions result;
+
+ private CSharpFieldOptions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ CSharpFieldOptions original = result;
+ result = new CSharpFieldOptions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
protected override CSharpFieldOptions MessageBeingBuilt {
- get { return result; }
+ get { return PrepareBuilder(); }
}
public override Builder Clear() {
- result = new CSharpFieldOptions();
+ result = DefaultInstance;
+ resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
- return new Builder().MergeFrom(result);
+ if (resultIsReadOnly) {
+ return new Builder(result);
+ } else {
+ return new Builder().MergeFrom(result);
+ }
}
public override pbd::MessageDescriptor DescriptorForType {
@@ -1003,12 +1138,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override CSharpFieldOptions BuildPartial() {
- if (result == null) {
- throw new global::System.InvalidOperationException("build() has already been called on this Builder");
+ if (resultIsReadOnly) {
+ return result;
}
- CSharpFieldOptions returnMe = result;
- result = null;
- return returnMe;
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
@@ -1022,6 +1156,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(CSharpFieldOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpFieldOptions.DefaultInstance) return this;
+ PrepareBuilder();
if (other.HasPropertyName) {
PropertyName = other.PropertyName;
}
@@ -1034,6 +1169,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
pb::UnknownFieldSet.Builder unknownFields = null;
uint tag;
string field_name;
@@ -1090,11 +1226,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public Builder SetPropertyName(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
result.hasPropertyName = true;
result.propertyName_ = value;
return this;
}
public Builder ClearPropertyName() {
+ PrepareBuilder();
result.hasPropertyName = false;
result.propertyName_ = "";
return this;
@@ -1109,7 +1247,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpServiceOptions : pb::GeneratedMessage<CSharpServiceOptions, CSharpServiceOptions.Builder> {
- private static readonly CSharpServiceOptions defaultInstance = new Builder().BuildPartial();
+ private CSharpServiceOptions() { }
+ private static readonly CSharpServiceOptions defaultInstance = new CSharpServiceOptions().MakeReadOnly();
private static readonly string[] _cSharpServiceOptionsFieldNames = new string[] { "interface_id" };
private static readonly uint[] _cSharpServiceOptionsFieldTags = new uint[] { 10 };
public static CSharpServiceOptions DefaultInstance {
@@ -1117,7 +1256,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override CSharpServiceOptions DefaultInstanceForType {
- get { return defaultInstance; }
+ get { return DefaultInstance; }
}
protected override CSharpServiceOptions ThisMessage {
@@ -1203,11 +1342,15 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public static CSharpServiceOptions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
+ private CSharpServiceOptions MakeReadOnly() {
+ return this;
+ }
+
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(CSharpServiceOptions prototype) {
- return (Builder) new Builder().MergeFrom(prototype);
+ return new Builder(prototype);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -1217,21 +1360,48 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
protected override Builder ThisBuilder {
get { return this; }
}
- public Builder() {}
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(CSharpServiceOptions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
- CSharpServiceOptions result = new CSharpServiceOptions();
+ private bool resultIsReadOnly;
+ private CSharpServiceOptions result;
+
+ private CSharpServiceOptions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ CSharpServiceOptions original = result;
+ result = new CSharpServiceOptions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
protected override CSharpServiceOptions MessageBeingBuilt {
- get { return result; }
+ get { return PrepareBuilder(); }
}
public override Builder Clear() {
- result = new CSharpServiceOptions();
+ result = DefaultInstance;
+ resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
- return new Builder().MergeFrom(result);
+ if (resultIsReadOnly) {
+ return new Builder(result);
+ } else {
+ return new Builder().MergeFrom(result);
+ }
}
public override pbd::MessageDescriptor DescriptorForType {
@@ -1243,12 +1413,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override CSharpServiceOptions BuildPartial() {
- if (result == null) {
- throw new global::System.InvalidOperationException("build() has already been called on this Builder");
+ if (resultIsReadOnly) {
+ return result;
}
- CSharpServiceOptions returnMe = result;
- result = null;
- return returnMe;
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
@@ -1262,6 +1431,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(CSharpServiceOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpServiceOptions.DefaultInstance) return this;
+ PrepareBuilder();
if (other.HasInterfaceId) {
InterfaceId = other.InterfaceId;
}
@@ -1274,6 +1444,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
pb::UnknownFieldSet.Builder unknownFields = null;
uint tag;
string field_name;
@@ -1330,11 +1501,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public Builder SetInterfaceId(string value) {
pb::ThrowHelper.ThrowIfNull(value, "value");
+ PrepareBuilder();
result.hasInterfaceId = true;
result.interfaceId_ = value;
return this;
}
public Builder ClearInterfaceId() {
+ PrepareBuilder();
result.hasInterfaceId = false;
result.interfaceId_ = "";
return this;
@@ -1349,7 +1522,8 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("ProtoGen", "2.3.0.277")]
public sealed partial class CSharpMethodOptions : pb::GeneratedMessage<CSharpMethodOptions, CSharpMethodOptions.Builder> {
- private static readonly CSharpMethodOptions defaultInstance = new Builder().BuildPartial();
+ private CSharpMethodOptions() { }
+ private static readonly CSharpMethodOptions defaultInstance = new CSharpMethodOptions().MakeReadOnly();
private static readonly string[] _cSharpMethodOptionsFieldNames = new string[] { "dispatch_id" };
private static readonly uint[] _cSharpMethodOptionsFieldTags = new uint[] { 8 };
public static CSharpMethodOptions DefaultInstance {
@@ -1357,7 +1531,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override CSharpMethodOptions DefaultInstanceForType {
- get { return defaultInstance; }
+ get { return DefaultInstance; }
}
protected override CSharpMethodOptions ThisMessage {
@@ -1443,11 +1617,15 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public static CSharpMethodOptions ParseFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
return ((Builder) CreateBuilder().MergeFrom(input, extensionRegistry)).BuildParsed();
}
+ private CSharpMethodOptions MakeReadOnly() {
+ return this;
+ }
+
public static Builder CreateBuilder() { return new Builder(); }
public override Builder ToBuilder() { return CreateBuilder(this); }
public override Builder CreateBuilderForType() { return new Builder(); }
public static Builder CreateBuilder(CSharpMethodOptions prototype) {
- return (Builder) new Builder().MergeFrom(prototype);
+ return new Builder(prototype);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
@@ -1457,21 +1635,48 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
protected override Builder ThisBuilder {
get { return this; }
}
- public Builder() {}
+ public Builder() {
+ result = DefaultInstance;
+ resultIsReadOnly = true;
+ }
+ internal Builder(CSharpMethodOptions cloneFrom) {
+ result = cloneFrom;
+ resultIsReadOnly = true;
+ }
- CSharpMethodOptions result = new CSharpMethodOptions();
+ private bool resultIsReadOnly;
+ private CSharpMethodOptions result;
+
+ private CSharpMethodOptions PrepareBuilder() {
+ if (resultIsReadOnly) {
+ CSharpMethodOptions original = result;
+ result = new CSharpMethodOptions();
+ resultIsReadOnly = false;
+ MergeFrom(original);
+ }
+ return result;
+ }
+
+ public override bool IsInitialized {
+ get { return result.IsInitialized; }
+ }
protected override CSharpMethodOptions MessageBeingBuilt {
- get { return result; }
+ get { return PrepareBuilder(); }
}
public override Builder Clear() {
- result = new CSharpMethodOptions();
+ result = DefaultInstance;
+ resultIsReadOnly = true;
return this;
}
public override Builder Clone() {
- return new Builder().MergeFrom(result);
+ if (resultIsReadOnly) {
+ return new Builder(result);
+ } else {
+ return new Builder().MergeFrom(result);
+ }
}
public override pbd::MessageDescriptor DescriptorForType {
@@ -1483,12 +1688,11 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override CSharpMethodOptions BuildPartial() {
- if (result == null) {
- throw new global::System.InvalidOperationException("build() has already been called on this Builder");
+ if (resultIsReadOnly) {
+ return result;
}
- CSharpMethodOptions returnMe = result;
- result = null;
- return returnMe;
+ resultIsReadOnly = true;
+ return result.MakeReadOnly();
}
public override Builder MergeFrom(pb::IMessage other) {
@@ -1502,6 +1706,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
public override Builder MergeFrom(CSharpMethodOptions other) {
if (other == global::Google.ProtocolBuffers.DescriptorProtos.CSharpMethodOptions.DefaultInstance) return this;
+ PrepareBuilder();
if (other.HasDispatchId) {
DispatchId = other.DispatchId;
}
@@ -1514,6 +1719,7 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
}
public override Builder MergeFrom(pb::ICodedInputStream input, pb::ExtensionRegistry extensionRegistry) {
+ PrepareBuilder();
pb::UnknownFieldSet.Builder unknownFields = null;
uint tag;
string field_name;
@@ -1569,11 +1775,13 @@ namespace Google.ProtocolBuffers.DescriptorProtos {
set { SetDispatchId(value); }
}
public Builder SetDispatchId(int value) {
+ PrepareBuilder();
result.hasDispatchId = true;
result.dispatchId_ = value;
return this;
}
public Builder ClearDispatchId() {
+ PrepareBuilder();
result.hasDispatchId = false;
result.dispatchId_ = 0;
return this;