diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml
index 035601e60fc3a..9045f93ffdaed 100644
--- a/.github/workflows/test_csharp.yml
+++ b/.github/workflows/test_csharp.yml
@@ -35,7 +35,8 @@ jobs:
cd csharp &&
dotnet restore src/Google.Protobuf.sln &&
dotnet build -c Release src/Google.Protobuf.sln &&
- dotnet test -c Release -f net6.0 src/Google.Protobuf.Test/Google.Protobuf.Test.csproj"
+ dotnet test -c Release -f net6.0 src/Google.Protobuf.Test/Google.Protobuf.Test.csproj &&
+ dotnet test -c Release -f net8.0 src/Google.Protobuf.Test/Google.Protobuf.Test.csproj"
- name: Clear bazel between docker instances
run: sudo rm -rf _build .repository-cache
@@ -60,7 +61,7 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
with:
- dotnet-version: '6.0.x'
+ dotnet-version: '8.0.x'
# Workaround for incompatibility between gcloud and windows-2019 runners.
- name: Install Python
@@ -94,15 +95,15 @@ jobs:
# (we want to avoid references to ~/.nuget that won't be available in the subsequent docker run)
uses: protocolbuffers/protobuf-ci/docker@v4
with:
- image: mcr.microsoft.com/dotnet/sdk:6.0.100-bullseye-slim
+ image: mcr.microsoft.com/dotnet/sdk:8.0.100-bookworm-slim
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
command: >-
/bin/bash -cex '
DOTNET_CLI_TELEMETRY_OPTOUT=true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
- dotnet publish -c Release -f net6.0 /workspace/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj'
+ dotnet publish -c Release /workspace/csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj'
- - name: Use an actual aarch64 docker image to run protobuf C# tests with an emulator
+ - name: Use an actual aarch64 docker image to run protobuf C# tests with an emulator (.NET 6)
# "dotnet vstest" allows running tests from a pre-built project.
# * mount the protobuf root as /work to be able to access the crosscompiled files
# * to avoid running the process inside docker as root (which can pollute the workspace with files owned by root), we force
@@ -119,3 +120,21 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT=true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
dotnet vstest /workspace/csharp/src/Google.Protobuf.Test/bin/Release/net6.0/publish/Google.Protobuf.Test.dll'
+
+ - name: Use an actual aarch64 docker image to run protobuf C# tests with an emulator (.NET 8)
+ # "dotnet vstest" allows running tests from a pre-built project.
+ # * mount the protobuf root as /work to be able to access the crosscompiled files
+ # * to avoid running the process inside docker as root (which can pollute the workspace with files owned by root), we force
+ # running under current user's UID and GID. To be able to do that, we need to provide a home directory for the user
+ # otherwise the UID would be homeless under the docker container and pip install wouldn't work. For simplicity,
+ # we just run map the user's home to a throwaway temporary directory
+ uses: protocolbuffers/protobuf-ci/docker@v4
+ with:
+ image: mcr.microsoft.com/dotnet/sdk:8.0.100-bookworm-slim-arm64v8
+ skip-staleness-check: true
+ credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
+ command: >-
+ /bin/bash -cex '
+ DOTNET_CLI_TELEMETRY_OPTOUT=true
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
+ dotnet vstest /workspace/csharp/src/Google.Protobuf.Test/bin/Release/net8.0/publish/Google.Protobuf.Test.dll'
diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh
index 3b06f34587b22..b91ec5968ac03 100755
--- a/csharp/generate_protos.sh
+++ b/csharp/generate_protos.sh
@@ -45,6 +45,7 @@ $PROTOC -Isrc --csharp_out=csharp/src/Google.Protobuf \
src/google/protobuf/type.proto \
src/google/protobuf/wrappers.proto \
src/google/protobuf/compiler/plugin.proto
+# We are NOT generating NRT variants for Google.Protobuf right now to avoid breaking/unexpected changes!
# Test protos
# Note that this deliberately does *not* include old_extensions1.proto
@@ -81,13 +82,47 @@ $PROTOC -Isrc -I. \
src/google/protobuf/unittest_legacy_features.proto \
src/google/protobuf/unittest_proto3_optional.proto \
src/google/protobuf/unittest_retention.proto
+$PROTOC -Isrc -I. \
+ --experimental_allow_proto3_optional \
+ --experimental_editions \
+ --csharp_out=csharp/src/Google.Protobuf.Test.TestProtos/Nrt \
+ --csharp_opt=enable_nrt,file_extension=.pb.nrt.cs \
+ conformance/test_protos/test_messages_edition2023.proto \
+ csharp/protos/map_unittest_proto3.proto \
+ csharp/protos/unittest_issues.proto \
+ csharp/protos/unittest_custom_options_proto3.proto \
+ csharp/protos/unittest_proto3.proto \
+ csharp/protos/unittest_import_proto3.proto \
+ csharp/protos/unittest_import_public_proto3.proto \
+ csharp/protos/unittest.proto \
+ csharp/protos/unittest_import.proto \
+ csharp/protos/unittest_import_public.proto \
+ csharp/protos/unittest_issue6936_a.proto \
+ csharp/protos/unittest_issue6936_b.proto \
+ csharp/protos/unittest_issue6936_c.proto \
+ csharp/protos/unittest_selfreferential_options.proto \
+ editions/golden/test_messages_proto3_editions.proto \
+ editions/golden/test_messages_proto2_editions.proto \
+ src/google/protobuf/unittest_well_known_types.proto \
+ src/google/protobuf/test_messages_proto3.proto \
+ src/google/protobuf/test_messages_proto2.proto \
+ src/google/protobuf/unittest_features.proto \
+ src/google/protobuf/unittest_legacy_features.proto \
+ src/google/protobuf/unittest_proto3_optional.proto \
+ src/google/protobuf/unittest_retention.proto
# AddressBook sample protos
$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook \
--csharp_opt=file_extension=.pb.cs \
examples/addressbook.proto
+$PROTOC -Iexamples -Isrc --csharp_out=csharp/src/AddressBook/Nrt \
+ --csharp_opt=enable_nrt,file_extension=.pb.nrt.cs \
+ examples/addressbook.proto
# Conformance tests
$PROTOC -I. --csharp_out=csharp/src/Google.Protobuf.Conformance \
--csharp_opt=file_extension=.pb.cs \
conformance/conformance.proto
+$PROTOC -I. --csharp_out=csharp/src/Google.Protobuf.Conformance/Nrt \
+ --csharp_opt=enable_nrt,file_extension=.pb.nrt.cs \
+ conformance/conformance.proto
diff --git a/csharp/install_dotnet_sdk.ps1 b/csharp/install_dotnet_sdk.ps1
index f9dc0d9d7ac38..7fdb229061c5c 100755
--- a/csharp/install_dotnet_sdk.ps1
+++ b/csharp/install_dotnet_sdk.ps1
@@ -17,4 +17,4 @@ Invoke-WebRequest -Uri $InstallScriptUrl -OutFile $InstallScriptPath
# The SDK versions to install should be kept in sync with versions
# installed by kokoro/linux/dockerfile/test/csharp/Dockerfile
&$InstallScriptPath -Version 3.1.415
-&$InstallScriptPath -Version 6.0.100
+&$InstallScriptPath -Version 8.0.100
diff --git a/csharp/src/AddressBook/AddressBook.csproj b/csharp/src/AddressBook/AddressBook.csproj
index a50fc470338db..07c20bc2c9ea4 100644
--- a/csharp/src/AddressBook/AddressBook.csproj
+++ b/csharp/src/AddressBook/AddressBook.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0;net8.0
Exe
Google.Protobuf.Examples.AddressBook.Program
False
@@ -11,4 +11,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/csharp/src/AddressBook/Nrt/Addressbook.pb.nrt.cs b/csharp/src/AddressBook/Nrt/Addressbook.pb.nrt.cs
new file mode 100644
index 0000000000000..17f9eec5ecc93
--- /dev/null
+++ b/csharp/src/AddressBook/Nrt/Addressbook.pb.nrt.cs
@@ -0,0 +1,844 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: addressbook.proto
+//
+#nullable enable annotations
+#pragma warning disable 1591, 0612, 3021, 8981
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Google.Protobuf.Examples.AddressBook {
+
+ /// Holder for reflection information generated from addressbook.proto
+ public static partial class AddressbookReflection {
+
+ #region Descriptor
+ /// File descriptor for addressbook.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static AddressbookReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "ChFhZGRyZXNzYm9vay5wcm90bxIIdHV0b3JpYWwaH2dvb2dsZS9wcm90b2J1",
+ "Zi90aW1lc3RhbXAucHJvdG8ihwIKBlBlcnNvbhIMCgRuYW1lGAEgASgJEgoK",
+ "AmlkGAIgASgFEg0KBWVtYWlsGAMgASgJEiwKBnBob25lcxgEIAMoCzIcLnR1",
+ "dG9yaWFsLlBlcnNvbi5QaG9uZU51bWJlchIwCgxsYXN0X3VwZGF0ZWQYBSAB",
+ "KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wGkcKC1Bob25lTnVtYmVy",
+ "Eg4KBm51bWJlchgBIAEoCRIoCgR0eXBlGAIgASgOMhoudHV0b3JpYWwuUGVy",
+ "c29uLlBob25lVHlwZSIrCglQaG9uZVR5cGUSCgoGTU9CSUxFEAASCAoESE9N",
+ "RRABEggKBFdPUksQAiIvCgtBZGRyZXNzQm9vaxIgCgZwZW9wbGUYASADKAsy",
+ "EC50dXRvcmlhbC5QZXJzb25ClQEKG2NvbS5leGFtcGxlLnR1dG9yaWFsLnBy",
+ "b3Rvc0IRQWRkcmVzc0Jvb2tQcm90b3NQAVo6Z2l0aHViLmNvbS9wcm90b2Nv",
+ "bGJ1ZmZlcnMvcHJvdG9idWYvZXhhbXBsZXMvZ28vdHV0b3JpYWxwYqoCJEdv",
+ "b2dsZS5Qcm90b2J1Zi5FeGFtcGxlcy5BZGRyZXNzQm9va2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Examples.AddressBook.Person), global::Google.Protobuf.Examples.AddressBook.Person.Parser, new[]{ "Name", "Id", "Email", "Phones", "LastUpdated" }, null, new[]{ typeof(global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber), global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber.Parser, new[]{ "Number", "Type" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Examples.AddressBook.AddressBook), global::Google.Protobuf.Examples.AddressBook.AddressBook.Parser, new[]{ "People" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ ///
+ /// [START messages]
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class Person : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Person());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.Examples.AddressBook.AddressbookReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Person() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Person(Person other) : this() {
+ name_ = other.name_;
+ id_ = other.id_;
+ email_ = other.email_;
+ phones_ = other.phones_.Clone();
+ lastUpdated_ = other.lastUpdated_ != null ? other.lastUpdated_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public Person Clone() {
+ return new Person(this);
+ }
+
+ /// Field number for the "name" field.
+ public const int NameFieldNumber = 1;
+ private string name_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Name {
+ get { return name_; }
+ set {
+ name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "id" field.
+ public const int IdFieldNumber = 2;
+ private int id_;
+ ///
+ /// Unique ID number for this person.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int Id {
+ get { return id_; }
+ set {
+ id_ = value;
+ }
+ }
+
+ /// Field number for the "email" field.
+ public const int EmailFieldNumber = 3;
+ private string email_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Email {
+ get { return email_; }
+ set {
+ email_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "phones" field.
+ public const int PhonesFieldNumber = 4;
+ private static readonly pb::FieldCodec _repeated_phones_codec
+ = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber.Parser);
+ private readonly pbc::RepeatedField phones_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField Phones {
+ get { return phones_; }
+ }
+
+ /// Field number for the "last_updated" field.
+ public const int LastUpdatedFieldNumber = 5;
+ private global::Google.Protobuf.WellKnownTypes.Timestamp lastUpdated_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.WellKnownTypes.Timestamp? LastUpdated {
+ get { return lastUpdated_; }
+ set {
+ lastUpdated_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as Person);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(Person? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Name != other.Name) return false;
+ if (Id != other.Id) return false;
+ if (Email != other.Email) return false;
+ if(!phones_.Equals(other.phones_)) return false;
+ if (!object.Equals(LastUpdated, other.LastUpdated)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Name.Length != 0) hash ^= Name.GetHashCode();
+ if (Id != 0) hash ^= Id.GetHashCode();
+ if (Email.Length != 0) hash ^= Email.GetHashCode();
+ hash ^= phones_.GetHashCode();
+ if (lastUpdated_ != null) hash ^= LastUpdated.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (Name.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (Id != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Id);
+ }
+ if (Email.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Email);
+ }
+ phones_.WriteTo(output, _repeated_phones_codec);
+ if (lastUpdated_ != null) {
+ output.WriteRawTag(42);
+ output.WriteMessage(LastUpdated);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (Name.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (Id != 0) {
+ output.WriteRawTag(16);
+ output.WriteInt32(Id);
+ }
+ if (Email.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(Email);
+ }
+ phones_.WriteTo(ref output, _repeated_phones_codec);
+ if (lastUpdated_ != null) {
+ output.WriteRawTag(42);
+ output.WriteMessage(LastUpdated);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (Name.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
+ }
+ if (Id != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id);
+ }
+ if (Email.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Email);
+ }
+ size += phones_.CalculateSize(_repeated_phones_codec);
+ if (lastUpdated_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(LastUpdated);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(Person? other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Name.Length != 0) {
+ Name = other.Name;
+ }
+ if (other.Id != 0) {
+ Id = other.Id;
+ }
+ if (other.Email.Length != 0) {
+ Email = other.Email;
+ }
+ phones_.Add(other.phones_);
+ if (other.lastUpdated_ != null) {
+ if (lastUpdated_ == null) {
+ LastUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ LastUpdated.MergeFrom(other.LastUpdated);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Name = input.ReadString();
+ break;
+ }
+ case 16: {
+ Id = input.ReadInt32();
+ break;
+ }
+ case 26: {
+ Email = input.ReadString();
+ break;
+ }
+ case 34: {
+ phones_.AddEntriesFrom(input, _repeated_phones_codec);
+ break;
+ }
+ case 42: {
+ if (lastUpdated_ == null) {
+ LastUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(LastUpdated);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Name = input.ReadString();
+ break;
+ }
+ case 16: {
+ Id = input.ReadInt32();
+ break;
+ }
+ case 26: {
+ Email = input.ReadString();
+ break;
+ }
+ case 34: {
+ phones_.AddEntriesFrom(ref input, _repeated_phones_codec);
+ break;
+ }
+ case 42: {
+ if (lastUpdated_ == null) {
+ LastUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ input.ReadMessage(LastUpdated);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ #region Nested types
+ /// Container for nested types declared in the Person message type.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static partial class Types {
+ public enum PhoneType {
+ [pbr::OriginalName("MOBILE")] Mobile = 0,
+ [pbr::OriginalName("HOME")] Home = 1,
+ [pbr::OriginalName("WORK")] Work = 2,
+ }
+
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class PhoneNumber : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PhoneNumber());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.Examples.AddressBook.Person.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public PhoneNumber() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public PhoneNumber(PhoneNumber other) : this() {
+ number_ = other.number_;
+ type_ = other.type_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public PhoneNumber Clone() {
+ return new PhoneNumber(this);
+ }
+
+ /// Field number for the "number" field.
+ public const int NumberFieldNumber = 1;
+ private string number_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Number {
+ get { return number_; }
+ set {
+ number_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "type" field.
+ public const int TypeFieldNumber = 2;
+ private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType type_ = global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType Type {
+ get { return type_; }
+ set {
+ type_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as PhoneNumber);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(PhoneNumber? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Number != other.Number) return false;
+ if (Type != other.Type) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Number.Length != 0) hash ^= Number.GetHashCode();
+ if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) hash ^= Type.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (Number.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Number);
+ }
+ if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) {
+ output.WriteRawTag(16);
+ output.WriteEnum((int) Type);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (Number.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Number);
+ }
+ if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) {
+ output.WriteRawTag(16);
+ output.WriteEnum((int) Type);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (Number.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Number);
+ }
+ if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(PhoneNumber? other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Number.Length != 0) {
+ Number = other.Number;
+ }
+ if (other.Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) {
+ Type = other.Type;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Number = input.ReadString();
+ break;
+ }
+ case 16: {
+ Type = (global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType) input.ReadEnum();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Number = input.ReadString();
+ break;
+ }
+ case 16: {
+ Type = (global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType) input.ReadEnum();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ ///
+ /// Our address book file is just one of these.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class AddressBook : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddressBook());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.Examples.AddressBook.AddressbookReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public AddressBook() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public AddressBook(AddressBook other) : this() {
+ people_ = other.people_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public AddressBook Clone() {
+ return new AddressBook(this);
+ }
+
+ /// Field number for the "people" field.
+ public const int PeopleFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_people_codec
+ = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Examples.AddressBook.Person.Parser);
+ private readonly pbc::RepeatedField people_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField People {
+ get { return people_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as AddressBook);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(AddressBook? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!people_.Equals(other.people_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= people_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ people_.WriteTo(output, _repeated_people_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ people_.WriteTo(ref output, _repeated_people_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += people_.CalculateSize(_repeated_people_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(AddressBook? other) {
+ if (other == null) {
+ return;
+ }
+ people_.Add(other.people_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ people_.AddEntriesFrom(input, _repeated_people_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ people_.AddEntriesFrom(ref input, _repeated_people_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj b/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj
index 3bcfb354266c8..fd8cd95bfe300 100644
--- a/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj
+++ b/csharp/src/Google.Protobuf.Conformance/Google.Protobuf.Conformance.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net6.0;net8.0
Exe
False
@@ -11,4 +11,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/csharp/src/Google.Protobuf.Conformance/Nrt/Conformance.pb.nrt.cs b/csharp/src/Google.Protobuf.Conformance/Nrt/Conformance.pb.nrt.cs
new file mode 100644
index 0000000000000..74d6a82b507e9
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Conformance/Nrt/Conformance.pb.nrt.cs
@@ -0,0 +1,2144 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: conformance/conformance.proto
+//
+#nullable enable annotations
+#pragma warning disable 1591, 0612, 3021, 8981
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Conformance {
+
+ /// Holder for reflection information generated from conformance/conformance.proto
+ public static partial class ConformanceReflection {
+
+ #region Descriptor
+ /// File descriptor for conformance/conformance.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static ConformanceReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch1jb25mb3JtYW5jZS9jb25mb3JtYW5jZS5wcm90bxILY29uZm9ybWFuY2Ui",
+ "SQoKVGVzdFN0YXR1cxIMCgRuYW1lGAEgASgJEhcKD2ZhaWx1cmVfbWVzc2Fn",
+ "ZRgCIAEoCRIUCgxtYXRjaGVkX25hbWUYAyABKAkiOQoKRmFpbHVyZVNldBIl",
+ "CgR0ZXN0GAIgAygLMhcuY29uZm9ybWFuY2UuVGVzdFN0YXR1c0oECAEQAiLj",
+ "AgoSQ29uZm9ybWFuY2VSZXF1ZXN0EhoKEHByb3RvYnVmX3BheWxvYWQYASAB",
+ "KAxIABIWCgxqc29uX3BheWxvYWQYAiABKAlIABIWCgxqc3BiX3BheWxvYWQY",
+ "ByABKAlIABIWCgx0ZXh0X3BheWxvYWQYCCABKAlIABI4ChdyZXF1ZXN0ZWRf",
+ "b3V0cHV0X2Zvcm1hdBgDIAEoDjIXLmNvbmZvcm1hbmNlLldpcmVGb3JtYXQS",
+ "FAoMbWVzc2FnZV90eXBlGAQgASgJEjAKDXRlc3RfY2F0ZWdvcnkYBSABKA4y",
+ "GS5jb25mb3JtYW5jZS5UZXN0Q2F0ZWdvcnkSPgoVanNwYl9lbmNvZGluZ19v",
+ "cHRpb25zGAYgASgLMh8uY29uZm9ybWFuY2UuSnNwYkVuY29kaW5nQ29uZmln",
+ "EhwKFHByaW50X3Vua25vd25fZmllbGRzGAkgASgIQgkKB3BheWxvYWQi+gEK",
+ "E0NvbmZvcm1hbmNlUmVzcG9uc2USFQoLcGFyc2VfZXJyb3IYASABKAlIABIZ",
+ "Cg9zZXJpYWxpemVfZXJyb3IYBiABKAlIABIXCg10aW1lb3V0X2Vycm9yGAkg",
+ "ASgJSAASFwoNcnVudGltZV9lcnJvchgCIAEoCUgAEhoKEHByb3RvYnVmX3Bh",
+ "eWxvYWQYAyABKAxIABIWCgxqc29uX3BheWxvYWQYBCABKAlIABIRCgdza2lw",
+ "cGVkGAUgASgJSAASFgoManNwYl9wYXlsb2FkGAcgASgJSAASFgoMdGV4dF9w",
+ "YXlsb2FkGAggASgJSABCCAoGcmVzdWx0IjcKEkpzcGJFbmNvZGluZ0NvbmZp",
+ "ZxIhChl1c2VfanNwYl9hcnJheV9hbnlfZm9ybWF0GAEgASgIKlAKCldpcmVG",
+ "b3JtYXQSDwoLVU5TUEVDSUZJRUQQABIMCghQUk9UT0JVRhABEggKBEpTT04Q",
+ "AhIICgRKU1BCEAMSDwoLVEVYVF9GT1JNQVQQBCqPAQoMVGVzdENhdGVnb3J5",
+ "EhQKEFVOU1BFQ0lGSUVEX1RFU1QQABIPCgtCSU5BUllfVEVTVBABEg0KCUpT",
+ "T05fVEVTVBACEiQKIEpTT05fSUdOT1JFX1VOS05PV05fUEFSU0lOR19URVNU",
+ "EAMSDQoJSlNQQl9URVNUEAQSFAoQVEVYVF9GT1JNQVRfVEVTVBAFQi8KH2Nv",
+ "bS5nb29nbGUucHJvdG9idWYuY29uZm9ybWFuY2WiAgtDb25mb3JtYW5jZWIG",
+ "cHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Conformance.WireFormat), typeof(global::Conformance.TestCategory), }, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.TestStatus), global::Conformance.TestStatus.Parser, new[]{ "Name", "FailureMessage", "MatchedName" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.FailureSet), global::Conformance.FailureSet.Parser, new[]{ "Test" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceRequest), global::Conformance.ConformanceRequest.Parser, new[]{ "ProtobufPayload", "JsonPayload", "JspbPayload", "TextPayload", "RequestedOutputFormat", "MessageType", "TestCategory", "JspbEncodingOptions", "PrintUnknownFields" }, new[]{ "Payload" }, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.ConformanceResponse), global::Conformance.ConformanceResponse.Parser, new[]{ "ParseError", "SerializeError", "TimeoutError", "RuntimeError", "ProtobufPayload", "JsonPayload", "Skipped", "JspbPayload", "TextPayload" }, new[]{ "Result" }, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Conformance.JspbEncodingConfig), global::Conformance.JspbEncodingConfig.Parser, new[]{ "UseJspbArrayAnyFormat" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum WireFormat {
+ [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0,
+ [pbr::OriginalName("PROTOBUF")] Protobuf = 1,
+ [pbr::OriginalName("JSON")] Json = 2,
+ ///
+ /// Only used inside Google. Opensource testees just skip it.
+ ///
+ [pbr::OriginalName("JSPB")] Jspb = 3,
+ [pbr::OriginalName("TEXT_FORMAT")] TextFormat = 4,
+ }
+
+ public enum TestCategory {
+ [pbr::OriginalName("UNSPECIFIED_TEST")] UnspecifiedTest = 0,
+ ///
+ /// Test binary wire format.
+ ///
+ [pbr::OriginalName("BINARY_TEST")] BinaryTest = 1,
+ ///
+ /// Test json wire format.
+ ///
+ [pbr::OriginalName("JSON_TEST")] JsonTest = 2,
+ ///
+ /// Similar to JSON_TEST. However, during parsing json, testee should ignore
+ /// unknown fields. This feature is optional. Each implementation can decide
+ /// whether to support it. See
+ /// https://developers.google.com/protocol-buffers/docs/proto3#json_options
+ /// for more detail.
+ ///
+ [pbr::OriginalName("JSON_IGNORE_UNKNOWN_PARSING_TEST")] JsonIgnoreUnknownParsingTest = 3,
+ ///
+ /// Test jspb wire format. Only used inside Google. Opensource testees just
+ /// skip it.
+ ///
+ [pbr::OriginalName("JSPB_TEST")] JspbTest = 4,
+ ///
+ /// Test text format. For cpp, java and python, testees can already deal with
+ /// this type. Testees of other languages can simply skip it.
+ ///
+ [pbr::OriginalName("TEXT_FORMAT_TEST")] TextFormatTest = 5,
+ }
+
+ #endregion
+
+ #region Messages
+ ///
+ /// Meant to encapsulate all types of tests: successes, skips, failures, etc.
+ /// Therefore, this may or may not have a failure message. Failure messages
+ /// may be truncated for our failure lists.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class TestStatus : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestStatus());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestStatus() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestStatus(TestStatus other) : this() {
+ name_ = other.name_;
+ failureMessage_ = other.failureMessage_;
+ matchedName_ = other.matchedName_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestStatus Clone() {
+ return new TestStatus(this);
+ }
+
+ /// Field number for the "name" field.
+ public const int NameFieldNumber = 1;
+ private string name_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Name {
+ get { return name_; }
+ set {
+ name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "failure_message" field.
+ public const int FailureMessageFieldNumber = 2;
+ private string failureMessage_ = "";
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string FailureMessage {
+ get { return failureMessage_; }
+ set {
+ failureMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "matched_name" field.
+ public const int MatchedNameFieldNumber = 3;
+ private string matchedName_ = "";
+ ///
+ /// What an actual test name matched to in a failure list. Can be wildcarded or
+ /// an exact match without wildcards.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string MatchedName {
+ get { return matchedName_; }
+ set {
+ matchedName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as TestStatus);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(TestStatus? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Name != other.Name) return false;
+ if (FailureMessage != other.FailureMessage) return false;
+ if (MatchedName != other.MatchedName) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Name.Length != 0) hash ^= Name.GetHashCode();
+ if (FailureMessage.Length != 0) hash ^= FailureMessage.GetHashCode();
+ if (MatchedName.Length != 0) hash ^= MatchedName.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (Name.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (FailureMessage.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(FailureMessage);
+ }
+ if (MatchedName.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(MatchedName);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (Name.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Name);
+ }
+ if (FailureMessage.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteString(FailureMessage);
+ }
+ if (MatchedName.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(MatchedName);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (Name.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
+ }
+ if (FailureMessage.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(FailureMessage);
+ }
+ if (MatchedName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MatchedName);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(TestStatus? other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Name.Length != 0) {
+ Name = other.Name;
+ }
+ if (other.FailureMessage.Length != 0) {
+ FailureMessage = other.FailureMessage;
+ }
+ if (other.MatchedName.Length != 0) {
+ MatchedName = other.MatchedName;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Name = input.ReadString();
+ break;
+ }
+ case 18: {
+ FailureMessage = input.ReadString();
+ break;
+ }
+ case 26: {
+ MatchedName = input.ReadString();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Name = input.ReadString();
+ break;
+ }
+ case 18: {
+ FailureMessage = input.ReadString();
+ break;
+ }
+ case 26: {
+ MatchedName = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// The conformance runner will request a list of failures as the first request.
+ /// This will be known by message_type == "conformance.FailureSet", a conformance
+ /// test should return a serialized FailureSet in protobuf_payload.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class FailureSet : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FailureSet());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public FailureSet() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public FailureSet(FailureSet other) : this() {
+ test_ = other.test_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public FailureSet Clone() {
+ return new FailureSet(this);
+ }
+
+ /// Field number for the "test" field.
+ public const int TestFieldNumber = 2;
+ private static readonly pb::FieldCodec _repeated_test_codec
+ = pb::FieldCodec.ForMessage(18, global::Conformance.TestStatus.Parser);
+ private readonly pbc::RepeatedField test_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField Test {
+ get { return test_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as FailureSet);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(FailureSet? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!test_.Equals(other.test_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= test_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ test_.WriteTo(output, _repeated_test_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ test_.WriteTo(ref output, _repeated_test_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += test_.CalculateSize(_repeated_test_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(FailureSet? other) {
+ if (other == null) {
+ return;
+ }
+ test_.Add(other.test_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 18: {
+ test_.AddEntriesFrom(input, _repeated_test_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 18: {
+ test_.AddEntriesFrom(ref input, _repeated_test_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// Represents a single test case's input. The testee should:
+ ///
+ /// 1. parse this proto (which should always succeed)
+ /// 2. parse the protobuf or JSON payload in "payload" (which may fail)
+ /// 3. if the parse succeeded, serialize the message in the requested format.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class ConformanceRequest : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConformanceRequest());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ConformanceRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ConformanceRequest(ConformanceRequest other) : this() {
+ requestedOutputFormat_ = other.requestedOutputFormat_;
+ messageType_ = other.messageType_;
+ testCategory_ = other.testCategory_;
+ jspbEncodingOptions_ = other.jspbEncodingOptions_ != null ? other.jspbEncodingOptions_.Clone() : null;
+ printUnknownFields_ = other.printUnknownFields_;
+ switch (other.PayloadCase) {
+ case PayloadOneofCase.ProtobufPayload:
+ ProtobufPayload = other.ProtobufPayload;
+ break;
+ case PayloadOneofCase.JsonPayload:
+ JsonPayload = other.JsonPayload;
+ break;
+ case PayloadOneofCase.JspbPayload:
+ JspbPayload = other.JspbPayload;
+ break;
+ case PayloadOneofCase.TextPayload:
+ TextPayload = other.TextPayload;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ConformanceRequest Clone() {
+ return new ConformanceRequest(this);
+ }
+
+ /// Field number for the "protobuf_payload" field.
+ public const int ProtobufPayloadFieldNumber = 1;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pb::ByteString ProtobufPayload {
+ get { return HasProtobufPayload ? (pb::ByteString) payload_ : pb::ByteString.Empty; }
+ set {
+ payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ payloadCase_ = PayloadOneofCase.ProtobufPayload;
+ }
+ }
+ /// Gets whether the "protobuf_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasProtobufPayload {
+ get { return payloadCase_ == PayloadOneofCase.ProtobufPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "protobuf_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearProtobufPayload() {
+ if (HasProtobufPayload) {
+ ClearPayload();
+ }
+ }
+
+ /// Field number for the "json_payload" field.
+ public const int JsonPayloadFieldNumber = 2;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string JsonPayload {
+ get { return HasJsonPayload ? (string) payload_ : ""; }
+ set {
+ payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ payloadCase_ = PayloadOneofCase.JsonPayload;
+ }
+ }
+ /// Gets whether the "json_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasJsonPayload {
+ get { return payloadCase_ == PayloadOneofCase.JsonPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "json_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearJsonPayload() {
+ if (HasJsonPayload) {
+ ClearPayload();
+ }
+ }
+
+ /// Field number for the "jspb_payload" field.
+ public const int JspbPayloadFieldNumber = 7;
+ ///
+ /// Only used inside Google. Opensource testees just skip it.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string JspbPayload {
+ get { return HasJspbPayload ? (string) payload_ : ""; }
+ set {
+ payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ payloadCase_ = PayloadOneofCase.JspbPayload;
+ }
+ }
+ /// Gets whether the "jspb_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasJspbPayload {
+ get { return payloadCase_ == PayloadOneofCase.JspbPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "jspb_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearJspbPayload() {
+ if (HasJspbPayload) {
+ ClearPayload();
+ }
+ }
+
+ /// Field number for the "text_payload" field.
+ public const int TextPayloadFieldNumber = 8;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string TextPayload {
+ get { return HasTextPayload ? (string) payload_ : ""; }
+ set {
+ payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ payloadCase_ = PayloadOneofCase.TextPayload;
+ }
+ }
+ /// Gets whether the "text_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasTextPayload {
+ get { return payloadCase_ == PayloadOneofCase.TextPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "text_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearTextPayload() {
+ if (HasTextPayload) {
+ ClearPayload();
+ }
+ }
+
+ /// Field number for the "requested_output_format" field.
+ public const int RequestedOutputFormatFieldNumber = 3;
+ private global::Conformance.WireFormat requestedOutputFormat_ = global::Conformance.WireFormat.Unspecified;
+ ///
+ /// Which format should the testee serialize its message to?
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Conformance.WireFormat RequestedOutputFormat {
+ get { return requestedOutputFormat_; }
+ set {
+ requestedOutputFormat_ = value;
+ }
+ }
+
+ /// Field number for the "message_type" field.
+ public const int MessageTypeFieldNumber = 4;
+ private string messageType_ = "";
+ ///
+ /// The full name for the test message to use; for the moment, either:
+ /// protobuf_test_messages.proto3.TestAllTypesProto3 or
+ /// protobuf_test_messages.proto2.TestAllTypesProto2 or
+ /// protobuf_test_messages.editions.proto2.TestAllTypesProto2 or
+ /// protobuf_test_messages.editions.proto3.TestAllTypesProto3 or
+ /// protobuf_test_messages.editions.TestAllTypesEdition2023.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string MessageType {
+ get { return messageType_; }
+ set {
+ messageType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "test_category" field.
+ public const int TestCategoryFieldNumber = 5;
+ private global::Conformance.TestCategory testCategory_ = global::Conformance.TestCategory.UnspecifiedTest;
+ ///
+ /// Each test is given a specific test category. Some category may need
+ /// specific support in testee programs. Refer to the definition of
+ /// TestCategory for more information.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Conformance.TestCategory TestCategory {
+ get { return testCategory_; }
+ set {
+ testCategory_ = value;
+ }
+ }
+
+ /// Field number for the "jspb_encoding_options" field.
+ public const int JspbEncodingOptionsFieldNumber = 6;
+ private global::Conformance.JspbEncodingConfig jspbEncodingOptions_;
+ ///
+ /// Specify details for how to encode jspb.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Conformance.JspbEncodingConfig? JspbEncodingOptions {
+ get { return jspbEncodingOptions_; }
+ set {
+ jspbEncodingOptions_ = value;
+ }
+ }
+
+ /// Field number for the "print_unknown_fields" field.
+ public const int PrintUnknownFieldsFieldNumber = 9;
+ private bool printUnknownFields_;
+ ///
+ /// This can be used in json and text format. If true, testee should print
+ /// unknown fields instead of ignore. This feature is optional.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool PrintUnknownFields {
+ get { return printUnknownFields_; }
+ set {
+ printUnknownFields_ = value;
+ }
+ }
+
+ private object payload_;
+ /// Enum of possible cases for the "payload" oneof.
+ public enum PayloadOneofCase {
+ None = 0,
+ ProtobufPayload = 1,
+ JsonPayload = 2,
+ JspbPayload = 7,
+ TextPayload = 8,
+ }
+ private PayloadOneofCase payloadCase_ = PayloadOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public PayloadOneofCase PayloadCase {
+ get { return payloadCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearPayload() {
+ payloadCase_ = PayloadOneofCase.None;
+ payload_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as ConformanceRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(ConformanceRequest? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ProtobufPayload != other.ProtobufPayload) return false;
+ if (JsonPayload != other.JsonPayload) return false;
+ if (JspbPayload != other.JspbPayload) return false;
+ if (TextPayload != other.TextPayload) return false;
+ if (RequestedOutputFormat != other.RequestedOutputFormat) return false;
+ if (MessageType != other.MessageType) return false;
+ if (TestCategory != other.TestCategory) return false;
+ if (!object.Equals(JspbEncodingOptions, other.JspbEncodingOptions)) return false;
+ if (PrintUnknownFields != other.PrintUnknownFields) return false;
+ if (PayloadCase != other.PayloadCase) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
+ if (HasJsonPayload) hash ^= JsonPayload.GetHashCode();
+ if (HasJspbPayload) hash ^= JspbPayload.GetHashCode();
+ if (HasTextPayload) hash ^= TextPayload.GetHashCode();
+ if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) hash ^= RequestedOutputFormat.GetHashCode();
+ if (MessageType.Length != 0) hash ^= MessageType.GetHashCode();
+ if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) hash ^= TestCategory.GetHashCode();
+ if (jspbEncodingOptions_ != null) hash ^= JspbEncodingOptions.GetHashCode();
+ if (PrintUnknownFields != false) hash ^= PrintUnknownFields.GetHashCode();
+ hash ^= (int) payloadCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (HasProtobufPayload) {
+ output.WriteRawTag(10);
+ output.WriteBytes(ProtobufPayload);
+ }
+ if (HasJsonPayload) {
+ output.WriteRawTag(18);
+ output.WriteString(JsonPayload);
+ }
+ if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) {
+ output.WriteRawTag(24);
+ output.WriteEnum((int) RequestedOutputFormat);
+ }
+ if (MessageType.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(MessageType);
+ }
+ if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) {
+ output.WriteRawTag(40);
+ output.WriteEnum((int) TestCategory);
+ }
+ if (jspbEncodingOptions_ != null) {
+ output.WriteRawTag(50);
+ output.WriteMessage(JspbEncodingOptions);
+ }
+ if (HasJspbPayload) {
+ output.WriteRawTag(58);
+ output.WriteString(JspbPayload);
+ }
+ if (HasTextPayload) {
+ output.WriteRawTag(66);
+ output.WriteString(TextPayload);
+ }
+ if (PrintUnknownFields != false) {
+ output.WriteRawTag(72);
+ output.WriteBool(PrintUnknownFields);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (HasProtobufPayload) {
+ output.WriteRawTag(10);
+ output.WriteBytes(ProtobufPayload);
+ }
+ if (HasJsonPayload) {
+ output.WriteRawTag(18);
+ output.WriteString(JsonPayload);
+ }
+ if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) {
+ output.WriteRawTag(24);
+ output.WriteEnum((int) RequestedOutputFormat);
+ }
+ if (MessageType.Length != 0) {
+ output.WriteRawTag(34);
+ output.WriteString(MessageType);
+ }
+ if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) {
+ output.WriteRawTag(40);
+ output.WriteEnum((int) TestCategory);
+ }
+ if (jspbEncodingOptions_ != null) {
+ output.WriteRawTag(50);
+ output.WriteMessage(JspbEncodingOptions);
+ }
+ if (HasJspbPayload) {
+ output.WriteRawTag(58);
+ output.WriteString(JspbPayload);
+ }
+ if (HasTextPayload) {
+ output.WriteRawTag(66);
+ output.WriteString(TextPayload);
+ }
+ if (PrintUnknownFields != false) {
+ output.WriteRawTag(72);
+ output.WriteBool(PrintUnknownFields);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasProtobufPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
+ }
+ if (HasJsonPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
+ }
+ if (HasJspbPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload);
+ }
+ if (HasTextPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(TextPayload);
+ }
+ if (RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RequestedOutputFormat);
+ }
+ if (MessageType.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MessageType);
+ }
+ if (TestCategory != global::Conformance.TestCategory.UnspecifiedTest) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TestCategory);
+ }
+ if (jspbEncodingOptions_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(JspbEncodingOptions);
+ }
+ if (PrintUnknownFields != false) {
+ size += 1 + 1;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(ConformanceRequest? other) {
+ if (other == null) {
+ return;
+ }
+ if (other.RequestedOutputFormat != global::Conformance.WireFormat.Unspecified) {
+ RequestedOutputFormat = other.RequestedOutputFormat;
+ }
+ if (other.MessageType.Length != 0) {
+ MessageType = other.MessageType;
+ }
+ if (other.TestCategory != global::Conformance.TestCategory.UnspecifiedTest) {
+ TestCategory = other.TestCategory;
+ }
+ if (other.jspbEncodingOptions_ != null) {
+ if (jspbEncodingOptions_ == null) {
+ JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
+ }
+ JspbEncodingOptions.MergeFrom(other.JspbEncodingOptions);
+ }
+ if (other.PrintUnknownFields != false) {
+ PrintUnknownFields = other.PrintUnknownFields;
+ }
+ switch (other.PayloadCase) {
+ case PayloadOneofCase.ProtobufPayload:
+ ProtobufPayload = other.ProtobufPayload;
+ break;
+ case PayloadOneofCase.JsonPayload:
+ JsonPayload = other.JsonPayload;
+ break;
+ case PayloadOneofCase.JspbPayload:
+ JspbPayload = other.JspbPayload;
+ break;
+ case PayloadOneofCase.TextPayload:
+ TextPayload = other.TextPayload;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ ProtobufPayload = input.ReadBytes();
+ break;
+ }
+ case 18: {
+ JsonPayload = input.ReadString();
+ break;
+ }
+ case 24: {
+ RequestedOutputFormat = (global::Conformance.WireFormat) input.ReadEnum();
+ break;
+ }
+ case 34: {
+ MessageType = input.ReadString();
+ break;
+ }
+ case 40: {
+ TestCategory = (global::Conformance.TestCategory) input.ReadEnum();
+ break;
+ }
+ case 50: {
+ if (jspbEncodingOptions_ == null) {
+ JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
+ }
+ input.ReadMessage(JspbEncodingOptions);
+ break;
+ }
+ case 58: {
+ JspbPayload = input.ReadString();
+ break;
+ }
+ case 66: {
+ TextPayload = input.ReadString();
+ break;
+ }
+ case 72: {
+ PrintUnknownFields = input.ReadBool();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ ProtobufPayload = input.ReadBytes();
+ break;
+ }
+ case 18: {
+ JsonPayload = input.ReadString();
+ break;
+ }
+ case 24: {
+ RequestedOutputFormat = (global::Conformance.WireFormat) input.ReadEnum();
+ break;
+ }
+ case 34: {
+ MessageType = input.ReadString();
+ break;
+ }
+ case 40: {
+ TestCategory = (global::Conformance.TestCategory) input.ReadEnum();
+ break;
+ }
+ case 50: {
+ if (jspbEncodingOptions_ == null) {
+ JspbEncodingOptions = new global::Conformance.JspbEncodingConfig();
+ }
+ input.ReadMessage(JspbEncodingOptions);
+ break;
+ }
+ case 58: {
+ JspbPayload = input.ReadString();
+ break;
+ }
+ case 66: {
+ TextPayload = input.ReadString();
+ break;
+ }
+ case 72: {
+ PrintUnknownFields = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// Represents a single test case's output.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class ConformanceResponse : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConformanceResponse());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ConformanceResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ConformanceResponse(ConformanceResponse other) : this() {
+ switch (other.ResultCase) {
+ case ResultOneofCase.ParseError:
+ ParseError = other.ParseError;
+ break;
+ case ResultOneofCase.SerializeError:
+ SerializeError = other.SerializeError;
+ break;
+ case ResultOneofCase.TimeoutError:
+ TimeoutError = other.TimeoutError;
+ break;
+ case ResultOneofCase.RuntimeError:
+ RuntimeError = other.RuntimeError;
+ break;
+ case ResultOneofCase.ProtobufPayload:
+ ProtobufPayload = other.ProtobufPayload;
+ break;
+ case ResultOneofCase.JsonPayload:
+ JsonPayload = other.JsonPayload;
+ break;
+ case ResultOneofCase.Skipped:
+ Skipped = other.Skipped;
+ break;
+ case ResultOneofCase.JspbPayload:
+ JspbPayload = other.JspbPayload;
+ break;
+ case ResultOneofCase.TextPayload:
+ TextPayload = other.TextPayload;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ConformanceResponse Clone() {
+ return new ConformanceResponse(this);
+ }
+
+ /// Field number for the "parse_error" field.
+ public const int ParseErrorFieldNumber = 1;
+ ///
+ /// This string should be set to indicate parsing failed. The string can
+ /// provide more information about the parse error if it is available.
+ ///
+ /// Setting this string does not necessarily mean the testee failed the
+ /// test. Some of the test cases are intentionally invalid input.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string ParseError {
+ get { return HasParseError ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.ParseError;
+ }
+ }
+ /// Gets whether the "parse_error" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasParseError {
+ get { return resultCase_ == ResultOneofCase.ParseError; }
+ }
+ /// Clears the value of the oneof if it's currently set to "parse_error"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearParseError() {
+ if (HasParseError) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "serialize_error" field.
+ public const int SerializeErrorFieldNumber = 6;
+ ///
+ /// If the input was successfully parsed but errors occurred when
+ /// serializing it to the requested output format, set the error message in
+ /// this field.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string SerializeError {
+ get { return HasSerializeError ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.SerializeError;
+ }
+ }
+ /// Gets whether the "serialize_error" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasSerializeError {
+ get { return resultCase_ == ResultOneofCase.SerializeError; }
+ }
+ /// Clears the value of the oneof if it's currently set to "serialize_error"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearSerializeError() {
+ if (HasSerializeError) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "timeout_error" field.
+ public const int TimeoutErrorFieldNumber = 9;
+ ///
+ /// This should be set if the test program timed out. The string should
+ /// provide more information about what the child process was doing when it
+ /// was killed.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string TimeoutError {
+ get { return HasTimeoutError ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.TimeoutError;
+ }
+ }
+ /// Gets whether the "timeout_error" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasTimeoutError {
+ get { return resultCase_ == ResultOneofCase.TimeoutError; }
+ }
+ /// Clears the value of the oneof if it's currently set to "timeout_error"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearTimeoutError() {
+ if (HasTimeoutError) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "runtime_error" field.
+ public const int RuntimeErrorFieldNumber = 2;
+ ///
+ /// This should be set if some other error occurred. This will always
+ /// indicate that the test failed. The string can provide more information
+ /// about the failure.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string RuntimeError {
+ get { return HasRuntimeError ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.RuntimeError;
+ }
+ }
+ /// Gets whether the "runtime_error" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasRuntimeError {
+ get { return resultCase_ == ResultOneofCase.RuntimeError; }
+ }
+ /// Clears the value of the oneof if it's currently set to "runtime_error"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearRuntimeError() {
+ if (HasRuntimeError) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "protobuf_payload" field.
+ public const int ProtobufPayloadFieldNumber = 3;
+ ///
+ /// If the input was successfully parsed and the requested output was
+ /// protobuf, serialize it to protobuf and set it in this field.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pb::ByteString ProtobufPayload {
+ get { return HasProtobufPayload ? (pb::ByteString) result_ : pb::ByteString.Empty; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.ProtobufPayload;
+ }
+ }
+ /// Gets whether the "protobuf_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasProtobufPayload {
+ get { return resultCase_ == ResultOneofCase.ProtobufPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "protobuf_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearProtobufPayload() {
+ if (HasProtobufPayload) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "json_payload" field.
+ public const int JsonPayloadFieldNumber = 4;
+ ///
+ /// If the input was successfully parsed and the requested output was JSON,
+ /// serialize to JSON and set it in this field.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string JsonPayload {
+ get { return HasJsonPayload ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.JsonPayload;
+ }
+ }
+ /// Gets whether the "json_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasJsonPayload {
+ get { return resultCase_ == ResultOneofCase.JsonPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "json_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearJsonPayload() {
+ if (HasJsonPayload) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "skipped" field.
+ public const int SkippedFieldNumber = 5;
+ ///
+ /// For when the testee skipped the test, likely because a certain feature
+ /// wasn't supported, like JSON input/output.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Skipped {
+ get { return HasSkipped ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.Skipped;
+ }
+ }
+ /// Gets whether the "skipped" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasSkipped {
+ get { return resultCase_ == ResultOneofCase.Skipped; }
+ }
+ /// Clears the value of the oneof if it's currently set to "skipped"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearSkipped() {
+ if (HasSkipped) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "jspb_payload" field.
+ public const int JspbPayloadFieldNumber = 7;
+ ///
+ /// If the input was successfully parsed and the requested output was JSPB,
+ /// serialize to JSPB and set it in this field. JSPB is only used inside
+ /// Google. Opensource testees can just skip it.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string JspbPayload {
+ get { return HasJspbPayload ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.JspbPayload;
+ }
+ }
+ /// Gets whether the "jspb_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasJspbPayload {
+ get { return resultCase_ == ResultOneofCase.JspbPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "jspb_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearJspbPayload() {
+ if (HasJspbPayload) {
+ ClearResult();
+ }
+ }
+
+ /// Field number for the "text_payload" field.
+ public const int TextPayloadFieldNumber = 8;
+ ///
+ /// If the input was successfully parsed and the requested output was
+ /// TEXT_FORMAT, serialize to TEXT_FORMAT and set it in this field.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string TextPayload {
+ get { return HasTextPayload ? (string) result_ : ""; }
+ set {
+ result_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ resultCase_ = ResultOneofCase.TextPayload;
+ }
+ }
+ /// Gets whether the "text_payload" field is set
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool HasTextPayload {
+ get { return resultCase_ == ResultOneofCase.TextPayload; }
+ }
+ /// Clears the value of the oneof if it's currently set to "text_payload"
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearTextPayload() {
+ if (HasTextPayload) {
+ ClearResult();
+ }
+ }
+
+ private object result_;
+ /// Enum of possible cases for the "result" oneof.
+ public enum ResultOneofCase {
+ None = 0,
+ ParseError = 1,
+ SerializeError = 6,
+ TimeoutError = 9,
+ RuntimeError = 2,
+ ProtobufPayload = 3,
+ JsonPayload = 4,
+ Skipped = 5,
+ JspbPayload = 7,
+ TextPayload = 8,
+ }
+ private ResultOneofCase resultCase_ = ResultOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public ResultOneofCase ResultCase {
+ get { return resultCase_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void ClearResult() {
+ resultCase_ = ResultOneofCase.None;
+ result_ = null;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as ConformanceResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(ConformanceResponse? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ParseError != other.ParseError) return false;
+ if (SerializeError != other.SerializeError) return false;
+ if (TimeoutError != other.TimeoutError) return false;
+ if (RuntimeError != other.RuntimeError) return false;
+ if (ProtobufPayload != other.ProtobufPayload) return false;
+ if (JsonPayload != other.JsonPayload) return false;
+ if (Skipped != other.Skipped) return false;
+ if (JspbPayload != other.JspbPayload) return false;
+ if (TextPayload != other.TextPayload) return false;
+ if (ResultCase != other.ResultCase) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (HasParseError) hash ^= ParseError.GetHashCode();
+ if (HasSerializeError) hash ^= SerializeError.GetHashCode();
+ if (HasTimeoutError) hash ^= TimeoutError.GetHashCode();
+ if (HasRuntimeError) hash ^= RuntimeError.GetHashCode();
+ if (HasProtobufPayload) hash ^= ProtobufPayload.GetHashCode();
+ if (HasJsonPayload) hash ^= JsonPayload.GetHashCode();
+ if (HasSkipped) hash ^= Skipped.GetHashCode();
+ if (HasJspbPayload) hash ^= JspbPayload.GetHashCode();
+ if (HasTextPayload) hash ^= TextPayload.GetHashCode();
+ hash ^= (int) resultCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (HasParseError) {
+ output.WriteRawTag(10);
+ output.WriteString(ParseError);
+ }
+ if (HasRuntimeError) {
+ output.WriteRawTag(18);
+ output.WriteString(RuntimeError);
+ }
+ if (HasProtobufPayload) {
+ output.WriteRawTag(26);
+ output.WriteBytes(ProtobufPayload);
+ }
+ if (HasJsonPayload) {
+ output.WriteRawTag(34);
+ output.WriteString(JsonPayload);
+ }
+ if (HasSkipped) {
+ output.WriteRawTag(42);
+ output.WriteString(Skipped);
+ }
+ if (HasSerializeError) {
+ output.WriteRawTag(50);
+ output.WriteString(SerializeError);
+ }
+ if (HasJspbPayload) {
+ output.WriteRawTag(58);
+ output.WriteString(JspbPayload);
+ }
+ if (HasTextPayload) {
+ output.WriteRawTag(66);
+ output.WriteString(TextPayload);
+ }
+ if (HasTimeoutError) {
+ output.WriteRawTag(74);
+ output.WriteString(TimeoutError);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (HasParseError) {
+ output.WriteRawTag(10);
+ output.WriteString(ParseError);
+ }
+ if (HasRuntimeError) {
+ output.WriteRawTag(18);
+ output.WriteString(RuntimeError);
+ }
+ if (HasProtobufPayload) {
+ output.WriteRawTag(26);
+ output.WriteBytes(ProtobufPayload);
+ }
+ if (HasJsonPayload) {
+ output.WriteRawTag(34);
+ output.WriteString(JsonPayload);
+ }
+ if (HasSkipped) {
+ output.WriteRawTag(42);
+ output.WriteString(Skipped);
+ }
+ if (HasSerializeError) {
+ output.WriteRawTag(50);
+ output.WriteString(SerializeError);
+ }
+ if (HasJspbPayload) {
+ output.WriteRawTag(58);
+ output.WriteString(JspbPayload);
+ }
+ if (HasTextPayload) {
+ output.WriteRawTag(66);
+ output.WriteString(TextPayload);
+ }
+ if (HasTimeoutError) {
+ output.WriteRawTag(74);
+ output.WriteString(TimeoutError);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (HasParseError) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(ParseError);
+ }
+ if (HasSerializeError) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(SerializeError);
+ }
+ if (HasTimeoutError) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(TimeoutError);
+ }
+ if (HasRuntimeError) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(RuntimeError);
+ }
+ if (HasProtobufPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(ProtobufPayload);
+ }
+ if (HasJsonPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonPayload);
+ }
+ if (HasSkipped) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Skipped);
+ }
+ if (HasJspbPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(JspbPayload);
+ }
+ if (HasTextPayload) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(TextPayload);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(ConformanceResponse? other) {
+ if (other == null) {
+ return;
+ }
+ switch (other.ResultCase) {
+ case ResultOneofCase.ParseError:
+ ParseError = other.ParseError;
+ break;
+ case ResultOneofCase.SerializeError:
+ SerializeError = other.SerializeError;
+ break;
+ case ResultOneofCase.TimeoutError:
+ TimeoutError = other.TimeoutError;
+ break;
+ case ResultOneofCase.RuntimeError:
+ RuntimeError = other.RuntimeError;
+ break;
+ case ResultOneofCase.ProtobufPayload:
+ ProtobufPayload = other.ProtobufPayload;
+ break;
+ case ResultOneofCase.JsonPayload:
+ JsonPayload = other.JsonPayload;
+ break;
+ case ResultOneofCase.Skipped:
+ Skipped = other.Skipped;
+ break;
+ case ResultOneofCase.JspbPayload:
+ JspbPayload = other.JspbPayload;
+ break;
+ case ResultOneofCase.TextPayload:
+ TextPayload = other.TextPayload;
+ break;
+ }
+
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ ParseError = input.ReadString();
+ break;
+ }
+ case 18: {
+ RuntimeError = input.ReadString();
+ break;
+ }
+ case 26: {
+ ProtobufPayload = input.ReadBytes();
+ break;
+ }
+ case 34: {
+ JsonPayload = input.ReadString();
+ break;
+ }
+ case 42: {
+ Skipped = input.ReadString();
+ break;
+ }
+ case 50: {
+ SerializeError = input.ReadString();
+ break;
+ }
+ case 58: {
+ JspbPayload = input.ReadString();
+ break;
+ }
+ case 66: {
+ TextPayload = input.ReadString();
+ break;
+ }
+ case 74: {
+ TimeoutError = input.ReadString();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ ParseError = input.ReadString();
+ break;
+ }
+ case 18: {
+ RuntimeError = input.ReadString();
+ break;
+ }
+ case 26: {
+ ProtobufPayload = input.ReadBytes();
+ break;
+ }
+ case 34: {
+ JsonPayload = input.ReadString();
+ break;
+ }
+ case 42: {
+ Skipped = input.ReadString();
+ break;
+ }
+ case 50: {
+ SerializeError = input.ReadString();
+ break;
+ }
+ case 58: {
+ JspbPayload = input.ReadString();
+ break;
+ }
+ case 66: {
+ TextPayload = input.ReadString();
+ break;
+ }
+ case 74: {
+ TimeoutError = input.ReadString();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// Encoding options for jspb format.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class JspbEncodingConfig : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new JspbEncodingConfig());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Conformance.ConformanceReflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public JspbEncodingConfig() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public JspbEncodingConfig(JspbEncodingConfig other) : this() {
+ useJspbArrayAnyFormat_ = other.useJspbArrayAnyFormat_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public JspbEncodingConfig Clone() {
+ return new JspbEncodingConfig(this);
+ }
+
+ /// Field number for the "use_jspb_array_any_format" field.
+ public const int UseJspbArrayAnyFormatFieldNumber = 1;
+ private bool useJspbArrayAnyFormat_;
+ ///
+ /// Encode the value field of Any as jspb array if true, otherwise binary.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool UseJspbArrayAnyFormat {
+ get { return useJspbArrayAnyFormat_; }
+ set {
+ useJspbArrayAnyFormat_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as JspbEncodingConfig);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(JspbEncodingConfig? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (UseJspbArrayAnyFormat != other.UseJspbArrayAnyFormat) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (UseJspbArrayAnyFormat != false) hash ^= UseJspbArrayAnyFormat.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (UseJspbArrayAnyFormat != false) {
+ output.WriteRawTag(8);
+ output.WriteBool(UseJspbArrayAnyFormat);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (UseJspbArrayAnyFormat != false) {
+ output.WriteRawTag(8);
+ output.WriteBool(UseJspbArrayAnyFormat);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (UseJspbArrayAnyFormat != false) {
+ size += 1 + 1;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(JspbEncodingConfig? other) {
+ if (other == null) {
+ return;
+ }
+ if (other.UseJspbArrayAnyFormat != false) {
+ UseJspbArrayAnyFormat = other.UseJspbArrayAnyFormat;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ UseJspbArrayAnyFormat = input.ReadBool();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 8: {
+ UseJspbArrayAnyFormat = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj b/csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj
index 1d21193dd4917..404cb0ea5f9a4 100644
--- a/csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj
+++ b/csharp/src/Google.Protobuf.Test.TestProtos/Google.Protobuf.Test.TestProtos.csproj
@@ -4,9 +4,10 @@
This TestProtos project is kept separate from the original test project for many reasons.
It allows us to make sure code can compile on a separate compiler version, different frameworks,
and without the internal visibility from the test project (all of which have caused issues in the past).
+ The .NET 8 variant will be generated with NRTs enabled while .NET Framework 4.6.2 and .NET Standard 2.0 won't.
-->
- net462;netstandard2.0
+ net462;netstandard2.0;net8.0
10.0
../../keys/Google.Protobuf.snk
true
@@ -22,4 +23,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/csharp/src/Google.Protobuf.Test.TestProtos/Nrt/MapUnittestProto3.pb.nrt.cs b/csharp/src/Google.Protobuf.Test.TestProtos/Nrt/MapUnittestProto3.pb.nrt.cs
new file mode 100644
index 0000000000000..006cc60a83184
--- /dev/null
+++ b/csharp/src/Google.Protobuf.Test.TestProtos/Nrt/MapUnittestProto3.pb.nrt.cs
@@ -0,0 +1,2342 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: csharp/protos/map_unittest_proto3.proto
+//
+#nullable enable annotations
+#pragma warning disable 1591, 0612, 3021, 8981
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Google.Protobuf.TestProtos {
+
+ /// Holder for reflection information generated from csharp/protos/map_unittest_proto3.proto
+ public static partial class MapUnittestProto3Reflection {
+
+ #region Descriptor
+ /// File descriptor for csharp/protos/map_unittest_proto3.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static MapUnittestProto3Reflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Cidjc2hhcnAvcHJvdG9zL21hcF91bml0dGVzdF9wcm90bzMucHJvdG8SEnBy",
+ "b3RvYnVmX3VuaXR0ZXN0MxojY3NoYXJwL3Byb3Rvcy91bml0dGVzdF9wcm90",
+ "bzMucHJvdG8iqRIKB1Rlc3RNYXASRwoPbWFwX2ludDMyX2ludDMyGAEgAygL",
+ "Mi4ucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RNYXAuTWFwSW50MzJJbnQzMkVu",
+ "dHJ5EkcKD21hcF9pbnQ2NF9pbnQ2NBgCIAMoCzIuLnByb3RvYnVmX3VuaXR0",
+ "ZXN0My5UZXN0TWFwLk1hcEludDY0SW50NjRFbnRyeRJLChFtYXBfdWludDMy",
+ "X3VpbnQzMhgDIAMoCzIwLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0TWFwLk1h",
+ "cFVpbnQzMlVpbnQzMkVudHJ5EksKEW1hcF91aW50NjRfdWludDY0GAQgAygL",
+ "MjAucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RNYXAuTWFwVWludDY0VWludDY0",
+ "RW50cnkSSwoRbWFwX3NpbnQzMl9zaW50MzIYBSADKAsyMC5wcm90b2J1Zl91",
+ "bml0dGVzdDMuVGVzdE1hcC5NYXBTaW50MzJTaW50MzJFbnRyeRJLChFtYXBf",
+ "c2ludDY0X3NpbnQ2NBgGIAMoCzIwLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0",
+ "TWFwLk1hcFNpbnQ2NFNpbnQ2NEVudHJ5Ek8KE21hcF9maXhlZDMyX2ZpeGVk",
+ "MzIYByADKAsyMi5wcm90b2J1Zl91bml0dGVzdDMuVGVzdE1hcC5NYXBGaXhl",
+ "ZDMyRml4ZWQzMkVudHJ5Ek8KE21hcF9maXhlZDY0X2ZpeGVkNjQYCCADKAsy",
+ "Mi5wcm90b2J1Zl91bml0dGVzdDMuVGVzdE1hcC5NYXBGaXhlZDY0Rml4ZWQ2",
+ "NEVudHJ5ElMKFW1hcF9zZml4ZWQzMl9zZml4ZWQzMhgJIAMoCzI0LnByb3Rv",
+ "YnVmX3VuaXR0ZXN0My5UZXN0TWFwLk1hcFNmaXhlZDMyU2ZpeGVkMzJFbnRy",
+ "eRJTChVtYXBfc2ZpeGVkNjRfc2ZpeGVkNjQYCiADKAsyNC5wcm90b2J1Zl91",
+ "bml0dGVzdDMuVGVzdE1hcC5NYXBTZml4ZWQ2NFNmaXhlZDY0RW50cnkSRwoP",
+ "bWFwX2ludDMyX2Zsb2F0GAsgAygLMi4ucHJvdG9idWZfdW5pdHRlc3QzLlRl",
+ "c3RNYXAuTWFwSW50MzJGbG9hdEVudHJ5EkkKEG1hcF9pbnQzMl9kb3VibGUY",
+ "DCADKAsyLy5wcm90b2J1Zl91bml0dGVzdDMuVGVzdE1hcC5NYXBJbnQzMkRv",
+ "dWJsZUVudHJ5EkMKDW1hcF9ib29sX2Jvb2wYDSADKAsyLC5wcm90b2J1Zl91",
+ "bml0dGVzdDMuVGVzdE1hcC5NYXBCb29sQm9vbEVudHJ5EksKEW1hcF9zdHJp",
+ "bmdfc3RyaW5nGA4gAygLMjAucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RNYXAu",
+ "TWFwU3RyaW5nU3RyaW5nRW50cnkSRwoPbWFwX2ludDMyX2J5dGVzGA8gAygL",
+ "Mi4ucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RNYXAuTWFwSW50MzJCeXRlc0Vu",
+ "dHJ5EkUKDm1hcF9pbnQzMl9lbnVtGBAgAygLMi0ucHJvdG9idWZfdW5pdHRl",
+ "c3QzLlRlc3RNYXAuTWFwSW50MzJFbnVtRW50cnkSWgoZbWFwX2ludDMyX2Zv",
+ "cmVpZ25fbWVzc2FnZRgRIAMoCzI3LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0",
+ "TWFwLk1hcEludDMyRm9yZWlnbk1lc3NhZ2VFbnRyeRo0ChJNYXBJbnQzMklu",
+ "dDMyRW50cnkSCwoDa2V5GAEgASgFEg0KBXZhbHVlGAIgASgFOgI4ARo0ChJN",
+ "YXBJbnQ2NEludDY0RW50cnkSCwoDa2V5GAEgASgDEg0KBXZhbHVlGAIgASgD",
+ "OgI4ARo2ChRNYXBVaW50MzJVaW50MzJFbnRyeRILCgNrZXkYASABKA0SDQoF",
+ "dmFsdWUYAiABKA06AjgBGjYKFE1hcFVpbnQ2NFVpbnQ2NEVudHJ5EgsKA2tl",
+ "eRgBIAEoBBINCgV2YWx1ZRgCIAEoBDoCOAEaNgoUTWFwU2ludDMyU2ludDMy",
+ "RW50cnkSCwoDa2V5GAEgASgREg0KBXZhbHVlGAIgASgROgI4ARo2ChRNYXBT",
+ "aW50NjRTaW50NjRFbnRyeRILCgNrZXkYASABKBISDQoFdmFsdWUYAiABKBI6",
+ "AjgBGjgKFk1hcEZpeGVkMzJGaXhlZDMyRW50cnkSCwoDa2V5GAEgASgHEg0K",
+ "BXZhbHVlGAIgASgHOgI4ARo4ChZNYXBGaXhlZDY0Rml4ZWQ2NEVudHJ5EgsK",
+ "A2tleRgBIAEoBhINCgV2YWx1ZRgCIAEoBjoCOAEaOgoYTWFwU2ZpeGVkMzJT",
+ "Zml4ZWQzMkVudHJ5EgsKA2tleRgBIAEoDxINCgV2YWx1ZRgCIAEoDzoCOAEa",
+ "OgoYTWFwU2ZpeGVkNjRTZml4ZWQ2NEVudHJ5EgsKA2tleRgBIAEoEBINCgV2",
+ "YWx1ZRgCIAEoEDoCOAEaNAoSTWFwSW50MzJGbG9hdEVudHJ5EgsKA2tleRgB",
+ "IAEoBRINCgV2YWx1ZRgCIAEoAjoCOAEaNQoTTWFwSW50MzJEb3VibGVFbnRy",
+ "eRILCgNrZXkYASABKAUSDQoFdmFsdWUYAiABKAE6AjgBGjIKEE1hcEJvb2xC",
+ "b29sRW50cnkSCwoDa2V5GAEgASgIEg0KBXZhbHVlGAIgASgIOgI4ARo2ChRN",
+ "YXBTdHJpbmdTdHJpbmdFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiAB",
+ "KAk6AjgBGjQKEk1hcEludDMyQnl0ZXNFbnRyeRILCgNrZXkYASABKAUSDQoF",
+ "dmFsdWUYAiABKAw6AjgBGlAKEU1hcEludDMyRW51bUVudHJ5EgsKA2tleRgB",
+ "IAEoBRIqCgV2YWx1ZRgCIAEoDjIbLnByb3RvYnVmX3VuaXR0ZXN0My5NYXBF",
+ "bnVtOgI4ARphChtNYXBJbnQzMkZvcmVpZ25NZXNzYWdlRW50cnkSCwoDa2V5",
+ "GAEgASgFEjEKBXZhbHVlGAIgASgLMiIucHJvdG9idWZfdW5pdHRlc3QzLkZv",
+ "cmVpZ25NZXNzYWdlOgI4ASJCChFUZXN0TWFwU3VibWVzc2FnZRItCgh0ZXN0",
+ "X21hcBgBIAEoCzIbLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0TWFwIr4BCg5U",
+ "ZXN0TWVzc2FnZU1hcBJSChFtYXBfaW50MzJfbWVzc2FnZRgBIAMoCzI3LnBy",
+ "b3RvYnVmX3VuaXR0ZXN0My5UZXN0TWVzc2FnZU1hcC5NYXBJbnQzMk1lc3Nh",
+ "Z2VFbnRyeRpYChRNYXBJbnQzMk1lc3NhZ2VFbnRyeRILCgNrZXkYASABKAUS",
+ "LwoFdmFsdWUYAiABKAsyIC5wcm90b2J1Zl91bml0dGVzdDMuVGVzdEFsbFR5",
+ "cGVzOgI4ASLlAQoPVGVzdFNhbWVUeXBlTWFwEjsKBG1hcDEYASADKAsyLS5w",
+ "cm90b2J1Zl91bml0dGVzdDMuVGVzdFNhbWVUeXBlTWFwLk1hcDFFbnRyeRI7",
+ "CgRtYXAyGAIgAygLMi0ucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RTYW1lVHlw",
+ "ZU1hcC5NYXAyRW50cnkaKwoJTWFwMUVudHJ5EgsKA2tleRgBIAEoBRINCgV2",
+ "YWx1ZRgCIAEoBToCOAEaKwoJTWFwMkVudHJ5EgsKA2tleRgBIAEoBRINCgV2",
+ "YWx1ZRgCIAEoBToCOAEi9RAKDFRlc3RBcmVuYU1hcBJMCg9tYXBfaW50MzJf",
+ "aW50MzIYASADKAsyMy5wcm90b2J1Zl91bml0dGVzdDMuVGVzdEFyZW5hTWFw",
+ "Lk1hcEludDMySW50MzJFbnRyeRJMCg9tYXBfaW50NjRfaW50NjQYAiADKAsy",
+ "My5wcm90b2J1Zl91bml0dGVzdDMuVGVzdEFyZW5hTWFwLk1hcEludDY0SW50",
+ "NjRFbnRyeRJQChFtYXBfdWludDMyX3VpbnQzMhgDIAMoCzI1LnByb3RvYnVm",
+ "X3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAuTWFwVWludDMyVWludDMyRW50cnkS",
+ "UAoRbWFwX3VpbnQ2NF91aW50NjQYBCADKAsyNS5wcm90b2J1Zl91bml0dGVz",
+ "dDMuVGVzdEFyZW5hTWFwLk1hcFVpbnQ2NFVpbnQ2NEVudHJ5ElAKEW1hcF9z",
+ "aW50MzJfc2ludDMyGAUgAygLMjUucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RB",
+ "cmVuYU1hcC5NYXBTaW50MzJTaW50MzJFbnRyeRJQChFtYXBfc2ludDY0X3Np",
+ "bnQ2NBgGIAMoCzI1LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAu",
+ "TWFwU2ludDY0U2ludDY0RW50cnkSVAoTbWFwX2ZpeGVkMzJfZml4ZWQzMhgH",
+ "IAMoCzI3LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAuTWFwRml4",
+ "ZWQzMkZpeGVkMzJFbnRyeRJUChNtYXBfZml4ZWQ2NF9maXhlZDY0GAggAygL",
+ "MjcucHJvdG9idWZfdW5pdHRlc3QzLlRlc3RBcmVuYU1hcC5NYXBGaXhlZDY0",
+ "Rml4ZWQ2NEVudHJ5ElgKFW1hcF9zZml4ZWQzMl9zZml4ZWQzMhgJIAMoCzI5",
+ "LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAuTWFwU2ZpeGVkMzJT",
+ "Zml4ZWQzMkVudHJ5ElgKFW1hcF9zZml4ZWQ2NF9zZml4ZWQ2NBgKIAMoCzI5",
+ "LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAuTWFwU2ZpeGVkNjRT",
+ "Zml4ZWQ2NEVudHJ5EkwKD21hcF9pbnQzMl9mbG9hdBgLIAMoCzIzLnByb3Rv",
+ "YnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAuTWFwSW50MzJGbG9hdEVudHJ5",
+ "Ek4KEG1hcF9pbnQzMl9kb3VibGUYDCADKAsyNC5wcm90b2J1Zl91bml0dGVz",
+ "dDMuVGVzdEFyZW5hTWFwLk1hcEludDMyRG91YmxlRW50cnkSSAoNbWFwX2Jv",
+ "b2xfYm9vbBgNIAMoCzIxLnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFN",
+ "YXAuTWFwQm9vbEJvb2xFbnRyeRJKCg5tYXBfaW50MzJfZW51bRgOIAMoCzIy",
+ "LnByb3RvYnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAuTWFwSW50MzJFbnVt",
+ "RW50cnkSXwoZbWFwX2ludDMyX2ZvcmVpZ25fbWVzc2FnZRgPIAMoCzI8LnBy",
+ "b3RvYnVmX3VuaXR0ZXN0My5UZXN0QXJlbmFNYXAuTWFwSW50MzJGb3JlaWdu",
+ "TWVzc2FnZUVudHJ5GjQKEk1hcEludDMySW50MzJFbnRyeRILCgNrZXkYASAB",
+ "KAUSDQoFdmFsdWUYAiABKAU6AjgBGjQKEk1hcEludDY0SW50NjRFbnRyeRIL",
+ "CgNrZXkYASABKAMSDQoFdmFsdWUYAiABKAM6AjgBGjYKFE1hcFVpbnQzMlVp",
+ "bnQzMkVudHJ5EgsKA2tleRgBIAEoDRINCgV2YWx1ZRgCIAEoDToCOAEaNgoU",
+ "TWFwVWludDY0VWludDY0RW50cnkSCwoDa2V5GAEgASgEEg0KBXZhbHVlGAIg",
+ "ASgEOgI4ARo2ChRNYXBTaW50MzJTaW50MzJFbnRyeRILCgNrZXkYASABKBES",
+ "DQoFdmFsdWUYAiABKBE6AjgBGjYKFE1hcFNpbnQ2NFNpbnQ2NEVudHJ5EgsK",
+ "A2tleRgBIAEoEhINCgV2YWx1ZRgCIAEoEjoCOAEaOAoWTWFwRml4ZWQzMkZp",
+ "eGVkMzJFbnRyeRILCgNrZXkYASABKAcSDQoFdmFsdWUYAiABKAc6AjgBGjgK",
+ "Fk1hcEZpeGVkNjRGaXhlZDY0RW50cnkSCwoDa2V5GAEgASgGEg0KBXZhbHVl",
+ "GAIgASgGOgI4ARo6ChhNYXBTZml4ZWQzMlNmaXhlZDMyRW50cnkSCwoDa2V5",
+ "GAEgASgPEg0KBXZhbHVlGAIgASgPOgI4ARo6ChhNYXBTZml4ZWQ2NFNmaXhl",
+ "ZDY0RW50cnkSCwoDa2V5GAEgASgQEg0KBXZhbHVlGAIgASgQOgI4ARo0ChJN",
+ "YXBJbnQzMkZsb2F0RW50cnkSCwoDa2V5GAEgASgFEg0KBXZhbHVlGAIgASgC",
+ "OgI4ARo1ChNNYXBJbnQzMkRvdWJsZUVudHJ5EgsKA2tleRgBIAEoBRINCgV2",
+ "YWx1ZRgCIAEoAToCOAEaMgoQTWFwQm9vbEJvb2xFbnRyeRILCgNrZXkYASAB",
+ "KAgSDQoFdmFsdWUYAiABKAg6AjgBGlAKEU1hcEludDMyRW51bUVudHJ5EgsK",
+ "A2tleRgBIAEoBRIqCgV2YWx1ZRgCIAEoDjIbLnByb3RvYnVmX3VuaXR0ZXN0",
+ "My5NYXBFbnVtOgI4ARphChtNYXBJbnQzMkZvcmVpZ25NZXNzYWdlRW50cnkS",
+ "CwoDa2V5GAEgASgFEjEKBXZhbHVlGAIgASgLMiIucHJvdG9idWZfdW5pdHRl",
+ "c3QzLkZvcmVpZ25NZXNzYWdlOgI4ASLmAQofTWVzc2FnZUNvbnRhaW5pbmdF",
+ "bnVtQ2FsbGVkVHlwZRJLCgR0eXBlGAEgAygLMj0ucHJvdG9idWZfdW5pdHRl",
+ "c3QzLk1lc3NhZ2VDb250YWluaW5nRW51bUNhbGxlZFR5cGUuVHlwZUVudHJ5",
+ "GmAKCVR5cGVFbnRyeRILCgNrZXkYASABKAUSQgoFdmFsdWUYAiABKAsyMy5w",
+ "cm90b2J1Zl91bml0dGVzdDMuTWVzc2FnZUNvbnRhaW5pbmdFbnVtQ2FsbGVk",
+ "VHlwZToCOAEiFAoEVHlwZRIMCghUWVBFX0ZPTxAAIp4BCh9NZXNzYWdlQ29u",
+ "dGFpbmluZ01hcENhbGxlZEVudHJ5Ek0KBWVudHJ5GAEgAygLMj4ucHJvdG9i",
+ "dWZfdW5pdHRlc3QzLk1lc3NhZ2VDb250YWluaW5nTWFwQ2FsbGVkRW50cnku",
+ "RW50cnlFbnRyeRosCgpFbnRyeUVudHJ5EgsKA2tleRgBIAEoBRINCgV2YWx1",
+ "ZRgCIAEoBToCOAEqPwoHTWFwRW51bRIQCgxNQVBfRU5VTV9GT08QABIQCgxN",
+ "QVBfRU5VTV9CQVIQARIQCgxNQVBfRU5VTV9CQVoQAkIdqgIaR29vZ2xlLlBy",
+ "b3RvYnVmLlRlc3RQcm90b3NiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.MapEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMap), global::Google.Protobuf.TestProtos.TestMap.Parser, new[]{ "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapStringString", "MapInt32Bytes", "MapInt32Enum", "MapInt32ForeignMessage" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMapSubmessage), global::Google.Protobuf.TestProtos.TestMapSubmessage.Parser, new[]{ "TestMap" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestMessageMap), global::Google.Protobuf.TestProtos.TestMessageMap.Parser, new[]{ "MapInt32Message" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestSameTypeMap), global::Google.Protobuf.TestProtos.TestSameTypeMap.Parser, new[]{ "Map1", "Map2" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, }),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.TestArenaMap), global::Google.Protobuf.TestProtos.TestArenaMap.Parser, new[]{ "MapInt32Int32", "MapInt64Int64", "MapUint32Uint32", "MapUint64Uint64", "MapSint32Sint32", "MapSint64Sint64", "MapFixed32Fixed32", "MapFixed64Fixed64", "MapSfixed32Sfixed32", "MapSfixed64Sfixed64", "MapInt32Float", "MapInt32Double", "MapBoolBool", "MapInt32Enum", "MapInt32ForeignMessage" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType), global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Parser, new[]{ "Type" }, null, new[]{ typeof(global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Types.Type) }, null, new pbr::GeneratedClrTypeInfo[] { null, }),
+ new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.MessageContainingMapCalledEntry), global::Google.Protobuf.TestProtos.MessageContainingMapCalledEntry.Parser, new[]{ "Entry" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
+ }));
+ }
+ #endregion
+
+ }
+ #region Enums
+ public enum MapEnum {
+ [pbr::OriginalName("MAP_ENUM_FOO")] Foo = 0,
+ [pbr::OriginalName("MAP_ENUM_BAR")] Bar = 1,
+ [pbr::OriginalName("MAP_ENUM_BAZ")] Baz = 2,
+ }
+
+ #endregion
+
+ #region Messages
+ ///
+ /// Tests maps.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class TestMap : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMap());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMap() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMap(TestMap other) : this() {
+ mapInt32Int32_ = other.mapInt32Int32_.Clone();
+ mapInt64Int64_ = other.mapInt64Int64_.Clone();
+ mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
+ mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
+ mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
+ mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
+ mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
+ mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
+ mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
+ mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
+ mapInt32Float_ = other.mapInt32Float_.Clone();
+ mapInt32Double_ = other.mapInt32Double_.Clone();
+ mapBoolBool_ = other.mapBoolBool_.Clone();
+ mapStringString_ = other.mapStringString_.Clone();
+ mapInt32Bytes_ = other.mapInt32Bytes_.Clone();
+ mapInt32Enum_ = other.mapInt32Enum_.Clone();
+ mapInt32ForeignMessage_ = other.mapInt32ForeignMessage_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMap Clone() {
+ return new TestMap(this);
+ }
+
+ /// Field number for the "map_int32_int32" field.
+ public const int MapInt32Int32FieldNumber = 1;
+ private static readonly pbc::MapField.Codec _map_mapInt32Int32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForInt32(16, 0), 10);
+ private readonly pbc::MapField mapInt32Int32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Int32 {
+ get { return mapInt32Int32_; }
+ }
+
+ /// Field number for the "map_int64_int64" field.
+ public const int MapInt64Int64FieldNumber = 2;
+ private static readonly pbc::MapField.Codec _map_mapInt64Int64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt64(8, 0L), pb::FieldCodec.ForInt64(16, 0L), 18);
+ private readonly pbc::MapField mapInt64Int64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt64Int64 {
+ get { return mapInt64Int64_; }
+ }
+
+ /// Field number for the "map_uint32_uint32" field.
+ public const int MapUint32Uint32FieldNumber = 3;
+ private static readonly pbc::MapField.Codec _map_mapUint32Uint32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForUInt32(16, 0), 26);
+ private readonly pbc::MapField mapUint32Uint32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapUint32Uint32 {
+ get { return mapUint32Uint32_; }
+ }
+
+ /// Field number for the "map_uint64_uint64" field.
+ public const int MapUint64Uint64FieldNumber = 4;
+ private static readonly pbc::MapField.Codec _map_mapUint64Uint64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForUInt64(8, 0UL), pb::FieldCodec.ForUInt64(16, 0UL), 34);
+ private readonly pbc::MapField mapUint64Uint64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapUint64Uint64 {
+ get { return mapUint64Uint64_; }
+ }
+
+ /// Field number for the "map_sint32_sint32" field.
+ public const int MapSint32Sint32FieldNumber = 5;
+ private static readonly pbc::MapField.Codec _map_mapSint32Sint32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSInt32(8, 0), pb::FieldCodec.ForSInt32(16, 0), 42);
+ private readonly pbc::MapField mapSint32Sint32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSint32Sint32 {
+ get { return mapSint32Sint32_; }
+ }
+
+ /// Field number for the "map_sint64_sint64" field.
+ public const int MapSint64Sint64FieldNumber = 6;
+ private static readonly pbc::MapField.Codec _map_mapSint64Sint64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSInt64(8, 0L), pb::FieldCodec.ForSInt64(16, 0L), 50);
+ private readonly pbc::MapField mapSint64Sint64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSint64Sint64 {
+ get { return mapSint64Sint64_; }
+ }
+
+ /// Field number for the "map_fixed32_fixed32" field.
+ public const int MapFixed32Fixed32FieldNumber = 7;
+ private static readonly pbc::MapField.Codec _map_mapFixed32Fixed32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForFixed32(13, 0), pb::FieldCodec.ForFixed32(21, 0), 58);
+ private readonly pbc::MapField mapFixed32Fixed32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapFixed32Fixed32 {
+ get { return mapFixed32Fixed32_; }
+ }
+
+ /// Field number for the "map_fixed64_fixed64" field.
+ public const int MapFixed64Fixed64FieldNumber = 8;
+ private static readonly pbc::MapField.Codec _map_mapFixed64Fixed64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForFixed64(9, 0UL), pb::FieldCodec.ForFixed64(17, 0UL), 66);
+ private readonly pbc::MapField mapFixed64Fixed64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapFixed64Fixed64 {
+ get { return mapFixed64Fixed64_; }
+ }
+
+ /// Field number for the "map_sfixed32_sfixed32" field.
+ public const int MapSfixed32Sfixed32FieldNumber = 9;
+ private static readonly pbc::MapField.Codec _map_mapSfixed32Sfixed32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSFixed32(13, 0), pb::FieldCodec.ForSFixed32(21, 0), 74);
+ private readonly pbc::MapField mapSfixed32Sfixed32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSfixed32Sfixed32 {
+ get { return mapSfixed32Sfixed32_; }
+ }
+
+ /// Field number for the "map_sfixed64_sfixed64" field.
+ public const int MapSfixed64Sfixed64FieldNumber = 10;
+ private static readonly pbc::MapField.Codec _map_mapSfixed64Sfixed64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSFixed64(9, 0L), pb::FieldCodec.ForSFixed64(17, 0L), 82);
+ private readonly pbc::MapField mapSfixed64Sfixed64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSfixed64Sfixed64 {
+ get { return mapSfixed64Sfixed64_; }
+ }
+
+ /// Field number for the "map_int32_float" field.
+ public const int MapInt32FloatFieldNumber = 11;
+ private static readonly pbc::MapField.Codec _map_mapInt32Float_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForFloat(21, 0F), 90);
+ private readonly pbc::MapField mapInt32Float_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Float {
+ get { return mapInt32Float_; }
+ }
+
+ /// Field number for the "map_int32_double" field.
+ public const int MapInt32DoubleFieldNumber = 12;
+ private static readonly pbc::MapField.Codec _map_mapInt32Double_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForDouble(17, 0D), 98);
+ private readonly pbc::MapField mapInt32Double_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Double {
+ get { return mapInt32Double_; }
+ }
+
+ /// Field number for the "map_bool_bool" field.
+ public const int MapBoolBoolFieldNumber = 13;
+ private static readonly pbc::MapField.Codec _map_mapBoolBool_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForBool(8, false), pb::FieldCodec.ForBool(16, false), 106);
+ private readonly pbc::MapField mapBoolBool_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapBoolBool {
+ get { return mapBoolBool_; }
+ }
+
+ /// Field number for the "map_string_string" field.
+ public const int MapStringStringFieldNumber = 14;
+ private static readonly pbc::MapField.Codec _map_mapStringString_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 114);
+ private readonly pbc::MapField mapStringString_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapStringString {
+ get { return mapStringString_; }
+ }
+
+ /// Field number for the "map_int32_bytes" field.
+ public const int MapInt32BytesFieldNumber = 15;
+ private static readonly pbc::MapField.Codec _map_mapInt32Bytes_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForBytes(18, pb::ByteString.Empty), 122);
+ private readonly pbc::MapField mapInt32Bytes_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Bytes {
+ get { return mapInt32Bytes_; }
+ }
+
+ /// Field number for the "map_int32_enum" field.
+ public const int MapInt32EnumFieldNumber = 16;
+ private static readonly pbc::MapField.Codec _map_mapInt32Enum_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Google.Protobuf.TestProtos.MapEnum) x, global::Google.Protobuf.TestProtos.MapEnum.Foo), 130);
+ private readonly pbc::MapField mapInt32Enum_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Enum {
+ get { return mapInt32Enum_; }
+ }
+
+ /// Field number for the "map_int32_foreign_message" field.
+ public const int MapInt32ForeignMessageFieldNumber = 17;
+ private static readonly pbc::MapField.Codec _map_mapInt32ForeignMessage_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.ForeignMessage.Parser), 138);
+ private readonly pbc::MapField mapInt32ForeignMessage_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32ForeignMessage {
+ get { return mapInt32ForeignMessage_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as TestMap);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(TestMap? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
+ if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
+ if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
+ if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
+ if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
+ if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
+ if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
+ if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
+ if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
+ if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
+ if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
+ if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
+ if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
+ if (!MapStringString.Equals(other.MapStringString)) return false;
+ if (!MapInt32Bytes.Equals(other.MapInt32Bytes)) return false;
+ if (!MapInt32Enum.Equals(other.MapInt32Enum)) return false;
+ if (!MapInt32ForeignMessage.Equals(other.MapInt32ForeignMessage)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= MapInt32Int32.GetHashCode();
+ hash ^= MapInt64Int64.GetHashCode();
+ hash ^= MapUint32Uint32.GetHashCode();
+ hash ^= MapUint64Uint64.GetHashCode();
+ hash ^= MapSint32Sint32.GetHashCode();
+ hash ^= MapSint64Sint64.GetHashCode();
+ hash ^= MapFixed32Fixed32.GetHashCode();
+ hash ^= MapFixed64Fixed64.GetHashCode();
+ hash ^= MapSfixed32Sfixed32.GetHashCode();
+ hash ^= MapSfixed64Sfixed64.GetHashCode();
+ hash ^= MapInt32Float.GetHashCode();
+ hash ^= MapInt32Double.GetHashCode();
+ hash ^= MapBoolBool.GetHashCode();
+ hash ^= MapStringString.GetHashCode();
+ hash ^= MapInt32Bytes.GetHashCode();
+ hash ^= MapInt32Enum.GetHashCode();
+ hash ^= MapInt32ForeignMessage.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
+ mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
+ mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
+ mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
+ mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
+ mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
+ mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
+ mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
+ mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
+ mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
+ mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
+ mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
+ mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
+ mapStringString_.WriteTo(output, _map_mapStringString_codec);
+ mapInt32Bytes_.WriteTo(output, _map_mapInt32Bytes_codec);
+ mapInt32Enum_.WriteTo(output, _map_mapInt32Enum_codec);
+ mapInt32ForeignMessage_.WriteTo(output, _map_mapInt32ForeignMessage_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ mapInt32Int32_.WriteTo(ref output, _map_mapInt32Int32_codec);
+ mapInt64Int64_.WriteTo(ref output, _map_mapInt64Int64_codec);
+ mapUint32Uint32_.WriteTo(ref output, _map_mapUint32Uint32_codec);
+ mapUint64Uint64_.WriteTo(ref output, _map_mapUint64Uint64_codec);
+ mapSint32Sint32_.WriteTo(ref output, _map_mapSint32Sint32_codec);
+ mapSint64Sint64_.WriteTo(ref output, _map_mapSint64Sint64_codec);
+ mapFixed32Fixed32_.WriteTo(ref output, _map_mapFixed32Fixed32_codec);
+ mapFixed64Fixed64_.WriteTo(ref output, _map_mapFixed64Fixed64_codec);
+ mapSfixed32Sfixed32_.WriteTo(ref output, _map_mapSfixed32Sfixed32_codec);
+ mapSfixed64Sfixed64_.WriteTo(ref output, _map_mapSfixed64Sfixed64_codec);
+ mapInt32Float_.WriteTo(ref output, _map_mapInt32Float_codec);
+ mapInt32Double_.WriteTo(ref output, _map_mapInt32Double_codec);
+ mapBoolBool_.WriteTo(ref output, _map_mapBoolBool_codec);
+ mapStringString_.WriteTo(ref output, _map_mapStringString_codec);
+ mapInt32Bytes_.WriteTo(ref output, _map_mapInt32Bytes_codec);
+ mapInt32Enum_.WriteTo(ref output, _map_mapInt32Enum_codec);
+ mapInt32ForeignMessage_.WriteTo(ref output, _map_mapInt32ForeignMessage_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
+ size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
+ size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
+ size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
+ size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
+ size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
+ size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
+ size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
+ size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
+ size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
+ size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
+ size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
+ size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
+ size += mapStringString_.CalculateSize(_map_mapStringString_codec);
+ size += mapInt32Bytes_.CalculateSize(_map_mapInt32Bytes_codec);
+ size += mapInt32Enum_.CalculateSize(_map_mapInt32Enum_codec);
+ size += mapInt32ForeignMessage_.CalculateSize(_map_mapInt32ForeignMessage_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(TestMap? other) {
+ if (other == null) {
+ return;
+ }
+ mapInt32Int32_.MergeFrom(other.mapInt32Int32_);
+ mapInt64Int64_.MergeFrom(other.mapInt64Int64_);
+ mapUint32Uint32_.MergeFrom(other.mapUint32Uint32_);
+ mapUint64Uint64_.MergeFrom(other.mapUint64Uint64_);
+ mapSint32Sint32_.MergeFrom(other.mapSint32Sint32_);
+ mapSint64Sint64_.MergeFrom(other.mapSint64Sint64_);
+ mapFixed32Fixed32_.MergeFrom(other.mapFixed32Fixed32_);
+ mapFixed64Fixed64_.MergeFrom(other.mapFixed64Fixed64_);
+ mapSfixed32Sfixed32_.MergeFrom(other.mapSfixed32Sfixed32_);
+ mapSfixed64Sfixed64_.MergeFrom(other.mapSfixed64Sfixed64_);
+ mapInt32Float_.MergeFrom(other.mapInt32Float_);
+ mapInt32Double_.MergeFrom(other.mapInt32Double_);
+ mapBoolBool_.MergeFrom(other.mapBoolBool_);
+ mapStringString_.MergeFrom(other.mapStringString_);
+ mapInt32Bytes_.MergeFrom(other.mapInt32Bytes_);
+ mapInt32Enum_.MergeFrom(other.mapInt32Enum_);
+ mapInt32ForeignMessage_.MergeFrom(other.mapInt32ForeignMessage_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
+ break;
+ }
+ case 18: {
+ mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
+ break;
+ }
+ case 26: {
+ mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
+ break;
+ }
+ case 34: {
+ mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
+ break;
+ }
+ case 42: {
+ mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
+ break;
+ }
+ case 50: {
+ mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
+ break;
+ }
+ case 58: {
+ mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
+ break;
+ }
+ case 66: {
+ mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
+ break;
+ }
+ case 74: {
+ mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
+ break;
+ }
+ case 82: {
+ mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
+ break;
+ }
+ case 90: {
+ mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
+ break;
+ }
+ case 98: {
+ mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
+ break;
+ }
+ case 106: {
+ mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
+ break;
+ }
+ case 114: {
+ mapStringString_.AddEntriesFrom(input, _map_mapStringString_codec);
+ break;
+ }
+ case 122: {
+ mapInt32Bytes_.AddEntriesFrom(input, _map_mapInt32Bytes_codec);
+ break;
+ }
+ case 130: {
+ mapInt32Enum_.AddEntriesFrom(input, _map_mapInt32Enum_codec);
+ break;
+ }
+ case 138: {
+ mapInt32ForeignMessage_.AddEntriesFrom(input, _map_mapInt32ForeignMessage_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ mapInt32Int32_.AddEntriesFrom(ref input, _map_mapInt32Int32_codec);
+ break;
+ }
+ case 18: {
+ mapInt64Int64_.AddEntriesFrom(ref input, _map_mapInt64Int64_codec);
+ break;
+ }
+ case 26: {
+ mapUint32Uint32_.AddEntriesFrom(ref input, _map_mapUint32Uint32_codec);
+ break;
+ }
+ case 34: {
+ mapUint64Uint64_.AddEntriesFrom(ref input, _map_mapUint64Uint64_codec);
+ break;
+ }
+ case 42: {
+ mapSint32Sint32_.AddEntriesFrom(ref input, _map_mapSint32Sint32_codec);
+ break;
+ }
+ case 50: {
+ mapSint64Sint64_.AddEntriesFrom(ref input, _map_mapSint64Sint64_codec);
+ break;
+ }
+ case 58: {
+ mapFixed32Fixed32_.AddEntriesFrom(ref input, _map_mapFixed32Fixed32_codec);
+ break;
+ }
+ case 66: {
+ mapFixed64Fixed64_.AddEntriesFrom(ref input, _map_mapFixed64Fixed64_codec);
+ break;
+ }
+ case 74: {
+ mapSfixed32Sfixed32_.AddEntriesFrom(ref input, _map_mapSfixed32Sfixed32_codec);
+ break;
+ }
+ case 82: {
+ mapSfixed64Sfixed64_.AddEntriesFrom(ref input, _map_mapSfixed64Sfixed64_codec);
+ break;
+ }
+ case 90: {
+ mapInt32Float_.AddEntriesFrom(ref input, _map_mapInt32Float_codec);
+ break;
+ }
+ case 98: {
+ mapInt32Double_.AddEntriesFrom(ref input, _map_mapInt32Double_codec);
+ break;
+ }
+ case 106: {
+ mapBoolBool_.AddEntriesFrom(ref input, _map_mapBoolBool_codec);
+ break;
+ }
+ case 114: {
+ mapStringString_.AddEntriesFrom(ref input, _map_mapStringString_codec);
+ break;
+ }
+ case 122: {
+ mapInt32Bytes_.AddEntriesFrom(ref input, _map_mapInt32Bytes_codec);
+ break;
+ }
+ case 130: {
+ mapInt32Enum_.AddEntriesFrom(ref input, _map_mapInt32Enum_codec);
+ break;
+ }
+ case 138: {
+ mapInt32ForeignMessage_.AddEntriesFrom(ref input, _map_mapInt32ForeignMessage_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class TestMapSubmessage : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMapSubmessage());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMapSubmessage() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMapSubmessage(TestMapSubmessage other) : this() {
+ testMap_ = other.testMap_ != null ? other.testMap_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMapSubmessage Clone() {
+ return new TestMapSubmessage(this);
+ }
+
+ /// Field number for the "test_map" field.
+ public const int TestMapFieldNumber = 1;
+ private global::Google.Protobuf.TestProtos.TestMap testMap_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public global::Google.Protobuf.TestProtos.TestMap? TestMap {
+ get { return testMap_; }
+ set {
+ testMap_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as TestMapSubmessage);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(TestMapSubmessage? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(TestMap, other.TestMap)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (testMap_ != null) hash ^= TestMap.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (testMap_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(TestMap);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (testMap_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(TestMap);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (testMap_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(TestMap);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(TestMapSubmessage? other) {
+ if (other == null) {
+ return;
+ }
+ if (other.testMap_ != null) {
+ if (testMap_ == null) {
+ TestMap = new global::Google.Protobuf.TestProtos.TestMap();
+ }
+ TestMap.MergeFrom(other.TestMap);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (testMap_ == null) {
+ TestMap = new global::Google.Protobuf.TestProtos.TestMap();
+ }
+ input.ReadMessage(TestMap);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ if (testMap_ == null) {
+ TestMap = new global::Google.Protobuf.TestProtos.TestMap();
+ }
+ input.ReadMessage(TestMap);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class TestMessageMap : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMessageMap());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMessageMap() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMessageMap(TestMessageMap other) : this() {
+ mapInt32Message_ = other.mapInt32Message_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestMessageMap Clone() {
+ return new TestMessageMap(this);
+ }
+
+ /// Field number for the "map_int32_message" field.
+ public const int MapInt32MessageFieldNumber = 1;
+ private static readonly pbc::MapField.Codec _map_mapInt32Message_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.TestAllTypes.Parser), 10);
+ private readonly pbc::MapField mapInt32Message_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Message {
+ get { return mapInt32Message_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as TestMessageMap);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(TestMessageMap? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!MapInt32Message.Equals(other.MapInt32Message)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= MapInt32Message.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ mapInt32Message_.WriteTo(output, _map_mapInt32Message_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ mapInt32Message_.WriteTo(ref output, _map_mapInt32Message_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += mapInt32Message_.CalculateSize(_map_mapInt32Message_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(TestMessageMap? other) {
+ if (other == null) {
+ return;
+ }
+ mapInt32Message_.MergeFrom(other.mapInt32Message_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ mapInt32Message_.AddEntriesFrom(input, _map_mapInt32Message_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ mapInt32Message_.AddEntriesFrom(ref input, _map_mapInt32Message_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// Two map fields share the same entry default instance.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class TestSameTypeMap : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestSameTypeMap());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestSameTypeMap() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestSameTypeMap(TestSameTypeMap other) : this() {
+ map1_ = other.map1_.Clone();
+ map2_ = other.map2_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestSameTypeMap Clone() {
+ return new TestSameTypeMap(this);
+ }
+
+ /// Field number for the "map1" field.
+ public const int Map1FieldNumber = 1;
+ private static readonly pbc::MapField.Codec _map_map1_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForInt32(16, 0), 10);
+ private readonly pbc::MapField map1_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField Map1 {
+ get { return map1_; }
+ }
+
+ /// Field number for the "map2" field.
+ public const int Map2FieldNumber = 2;
+ private static readonly pbc::MapField.Codec _map_map2_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForInt32(16, 0), 18);
+ private readonly pbc::MapField map2_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField Map2 {
+ get { return map2_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as TestSameTypeMap);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(TestSameTypeMap? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Map1.Equals(other.Map1)) return false;
+ if (!Map2.Equals(other.Map2)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= Map1.GetHashCode();
+ hash ^= Map2.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ map1_.WriteTo(output, _map_map1_codec);
+ map2_.WriteTo(output, _map_map2_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ map1_.WriteTo(ref output, _map_map1_codec);
+ map2_.WriteTo(ref output, _map_map2_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += map1_.CalculateSize(_map_map1_codec);
+ size += map2_.CalculateSize(_map_map2_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(TestSameTypeMap? other) {
+ if (other == null) {
+ return;
+ }
+ map1_.MergeFrom(other.map1_);
+ map2_.MergeFrom(other.map2_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ map1_.AddEntriesFrom(input, _map_map1_codec);
+ break;
+ }
+ case 18: {
+ map2_.AddEntriesFrom(input, _map_map2_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ map1_.AddEntriesFrom(ref input, _map_map1_codec);
+ break;
+ }
+ case 18: {
+ map2_.AddEntriesFrom(ref input, _map_map2_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class TestArenaMap : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestArenaMap());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestArenaMap() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestArenaMap(TestArenaMap other) : this() {
+ mapInt32Int32_ = other.mapInt32Int32_.Clone();
+ mapInt64Int64_ = other.mapInt64Int64_.Clone();
+ mapUint32Uint32_ = other.mapUint32Uint32_.Clone();
+ mapUint64Uint64_ = other.mapUint64Uint64_.Clone();
+ mapSint32Sint32_ = other.mapSint32Sint32_.Clone();
+ mapSint64Sint64_ = other.mapSint64Sint64_.Clone();
+ mapFixed32Fixed32_ = other.mapFixed32Fixed32_.Clone();
+ mapFixed64Fixed64_ = other.mapFixed64Fixed64_.Clone();
+ mapSfixed32Sfixed32_ = other.mapSfixed32Sfixed32_.Clone();
+ mapSfixed64Sfixed64_ = other.mapSfixed64Sfixed64_.Clone();
+ mapInt32Float_ = other.mapInt32Float_.Clone();
+ mapInt32Double_ = other.mapInt32Double_.Clone();
+ mapBoolBool_ = other.mapBoolBool_.Clone();
+ mapInt32Enum_ = other.mapInt32Enum_.Clone();
+ mapInt32ForeignMessage_ = other.mapInt32ForeignMessage_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public TestArenaMap Clone() {
+ return new TestArenaMap(this);
+ }
+
+ /// Field number for the "map_int32_int32" field.
+ public const int MapInt32Int32FieldNumber = 1;
+ private static readonly pbc::MapField.Codec _map_mapInt32Int32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForInt32(16, 0), 10);
+ private readonly pbc::MapField mapInt32Int32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Int32 {
+ get { return mapInt32Int32_; }
+ }
+
+ /// Field number for the "map_int64_int64" field.
+ public const int MapInt64Int64FieldNumber = 2;
+ private static readonly pbc::MapField.Codec _map_mapInt64Int64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt64(8, 0L), pb::FieldCodec.ForInt64(16, 0L), 18);
+ private readonly pbc::MapField mapInt64Int64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt64Int64 {
+ get { return mapInt64Int64_; }
+ }
+
+ /// Field number for the "map_uint32_uint32" field.
+ public const int MapUint32Uint32FieldNumber = 3;
+ private static readonly pbc::MapField.Codec _map_mapUint32Uint32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForUInt32(16, 0), 26);
+ private readonly pbc::MapField mapUint32Uint32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapUint32Uint32 {
+ get { return mapUint32Uint32_; }
+ }
+
+ /// Field number for the "map_uint64_uint64" field.
+ public const int MapUint64Uint64FieldNumber = 4;
+ private static readonly pbc::MapField.Codec _map_mapUint64Uint64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForUInt64(8, 0UL), pb::FieldCodec.ForUInt64(16, 0UL), 34);
+ private readonly pbc::MapField mapUint64Uint64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapUint64Uint64 {
+ get { return mapUint64Uint64_; }
+ }
+
+ /// Field number for the "map_sint32_sint32" field.
+ public const int MapSint32Sint32FieldNumber = 5;
+ private static readonly pbc::MapField.Codec _map_mapSint32Sint32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSInt32(8, 0), pb::FieldCodec.ForSInt32(16, 0), 42);
+ private readonly pbc::MapField mapSint32Sint32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSint32Sint32 {
+ get { return mapSint32Sint32_; }
+ }
+
+ /// Field number for the "map_sint64_sint64" field.
+ public const int MapSint64Sint64FieldNumber = 6;
+ private static readonly pbc::MapField.Codec _map_mapSint64Sint64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSInt64(8, 0L), pb::FieldCodec.ForSInt64(16, 0L), 50);
+ private readonly pbc::MapField mapSint64Sint64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSint64Sint64 {
+ get { return mapSint64Sint64_; }
+ }
+
+ /// Field number for the "map_fixed32_fixed32" field.
+ public const int MapFixed32Fixed32FieldNumber = 7;
+ private static readonly pbc::MapField.Codec _map_mapFixed32Fixed32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForFixed32(13, 0), pb::FieldCodec.ForFixed32(21, 0), 58);
+ private readonly pbc::MapField mapFixed32Fixed32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapFixed32Fixed32 {
+ get { return mapFixed32Fixed32_; }
+ }
+
+ /// Field number for the "map_fixed64_fixed64" field.
+ public const int MapFixed64Fixed64FieldNumber = 8;
+ private static readonly pbc::MapField.Codec _map_mapFixed64Fixed64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForFixed64(9, 0UL), pb::FieldCodec.ForFixed64(17, 0UL), 66);
+ private readonly pbc::MapField mapFixed64Fixed64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapFixed64Fixed64 {
+ get { return mapFixed64Fixed64_; }
+ }
+
+ /// Field number for the "map_sfixed32_sfixed32" field.
+ public const int MapSfixed32Sfixed32FieldNumber = 9;
+ private static readonly pbc::MapField.Codec _map_mapSfixed32Sfixed32_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSFixed32(13, 0), pb::FieldCodec.ForSFixed32(21, 0), 74);
+ private readonly pbc::MapField mapSfixed32Sfixed32_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSfixed32Sfixed32 {
+ get { return mapSfixed32Sfixed32_; }
+ }
+
+ /// Field number for the "map_sfixed64_sfixed64" field.
+ public const int MapSfixed64Sfixed64FieldNumber = 10;
+ private static readonly pbc::MapField.Codec _map_mapSfixed64Sfixed64_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForSFixed64(9, 0L), pb::FieldCodec.ForSFixed64(17, 0L), 82);
+ private readonly pbc::MapField mapSfixed64Sfixed64_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapSfixed64Sfixed64 {
+ get { return mapSfixed64Sfixed64_; }
+ }
+
+ /// Field number for the "map_int32_float" field.
+ public const int MapInt32FloatFieldNumber = 11;
+ private static readonly pbc::MapField.Codec _map_mapInt32Float_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForFloat(21, 0F), 90);
+ private readonly pbc::MapField mapInt32Float_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Float {
+ get { return mapInt32Float_; }
+ }
+
+ /// Field number for the "map_int32_double" field.
+ public const int MapInt32DoubleFieldNumber = 12;
+ private static readonly pbc::MapField.Codec _map_mapInt32Double_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForDouble(17, 0D), 98);
+ private readonly pbc::MapField mapInt32Double_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Double {
+ get { return mapInt32Double_; }
+ }
+
+ /// Field number for the "map_bool_bool" field.
+ public const int MapBoolBoolFieldNumber = 13;
+ private static readonly pbc::MapField.Codec _map_mapBoolBool_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForBool(8, false), pb::FieldCodec.ForBool(16, false), 106);
+ private readonly pbc::MapField mapBoolBool_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapBoolBool {
+ get { return mapBoolBool_; }
+ }
+
+ /// Field number for the "map_int32_enum" field.
+ public const int MapInt32EnumFieldNumber = 14;
+ private static readonly pbc::MapField.Codec _map_mapInt32Enum_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::Google.Protobuf.TestProtos.MapEnum) x, global::Google.Protobuf.TestProtos.MapEnum.Foo), 114);
+ private readonly pbc::MapField mapInt32Enum_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32Enum {
+ get { return mapInt32Enum_; }
+ }
+
+ /// Field number for the "map_int32_foreign_message" field.
+ public const int MapInt32ForeignMessageFieldNumber = 15;
+ private static readonly pbc::MapField.Codec _map_mapInt32ForeignMessage_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.ForeignMessage.Parser), 122);
+ private readonly pbc::MapField mapInt32ForeignMessage_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField MapInt32ForeignMessage {
+ get { return mapInt32ForeignMessage_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as TestArenaMap);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(TestArenaMap? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!MapInt32Int32.Equals(other.MapInt32Int32)) return false;
+ if (!MapInt64Int64.Equals(other.MapInt64Int64)) return false;
+ if (!MapUint32Uint32.Equals(other.MapUint32Uint32)) return false;
+ if (!MapUint64Uint64.Equals(other.MapUint64Uint64)) return false;
+ if (!MapSint32Sint32.Equals(other.MapSint32Sint32)) return false;
+ if (!MapSint64Sint64.Equals(other.MapSint64Sint64)) return false;
+ if (!MapFixed32Fixed32.Equals(other.MapFixed32Fixed32)) return false;
+ if (!MapFixed64Fixed64.Equals(other.MapFixed64Fixed64)) return false;
+ if (!MapSfixed32Sfixed32.Equals(other.MapSfixed32Sfixed32)) return false;
+ if (!MapSfixed64Sfixed64.Equals(other.MapSfixed64Sfixed64)) return false;
+ if (!MapInt32Float.Equals(other.MapInt32Float)) return false;
+ if (!MapInt32Double.Equals(other.MapInt32Double)) return false;
+ if (!MapBoolBool.Equals(other.MapBoolBool)) return false;
+ if (!MapInt32Enum.Equals(other.MapInt32Enum)) return false;
+ if (!MapInt32ForeignMessage.Equals(other.MapInt32ForeignMessage)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= MapInt32Int32.GetHashCode();
+ hash ^= MapInt64Int64.GetHashCode();
+ hash ^= MapUint32Uint32.GetHashCode();
+ hash ^= MapUint64Uint64.GetHashCode();
+ hash ^= MapSint32Sint32.GetHashCode();
+ hash ^= MapSint64Sint64.GetHashCode();
+ hash ^= MapFixed32Fixed32.GetHashCode();
+ hash ^= MapFixed64Fixed64.GetHashCode();
+ hash ^= MapSfixed32Sfixed32.GetHashCode();
+ hash ^= MapSfixed64Sfixed64.GetHashCode();
+ hash ^= MapInt32Float.GetHashCode();
+ hash ^= MapInt32Double.GetHashCode();
+ hash ^= MapBoolBool.GetHashCode();
+ hash ^= MapInt32Enum.GetHashCode();
+ hash ^= MapInt32ForeignMessage.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ mapInt32Int32_.WriteTo(output, _map_mapInt32Int32_codec);
+ mapInt64Int64_.WriteTo(output, _map_mapInt64Int64_codec);
+ mapUint32Uint32_.WriteTo(output, _map_mapUint32Uint32_codec);
+ mapUint64Uint64_.WriteTo(output, _map_mapUint64Uint64_codec);
+ mapSint32Sint32_.WriteTo(output, _map_mapSint32Sint32_codec);
+ mapSint64Sint64_.WriteTo(output, _map_mapSint64Sint64_codec);
+ mapFixed32Fixed32_.WriteTo(output, _map_mapFixed32Fixed32_codec);
+ mapFixed64Fixed64_.WriteTo(output, _map_mapFixed64Fixed64_codec);
+ mapSfixed32Sfixed32_.WriteTo(output, _map_mapSfixed32Sfixed32_codec);
+ mapSfixed64Sfixed64_.WriteTo(output, _map_mapSfixed64Sfixed64_codec);
+ mapInt32Float_.WriteTo(output, _map_mapInt32Float_codec);
+ mapInt32Double_.WriteTo(output, _map_mapInt32Double_codec);
+ mapBoolBool_.WriteTo(output, _map_mapBoolBool_codec);
+ mapInt32Enum_.WriteTo(output, _map_mapInt32Enum_codec);
+ mapInt32ForeignMessage_.WriteTo(output, _map_mapInt32ForeignMessage_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ mapInt32Int32_.WriteTo(ref output, _map_mapInt32Int32_codec);
+ mapInt64Int64_.WriteTo(ref output, _map_mapInt64Int64_codec);
+ mapUint32Uint32_.WriteTo(ref output, _map_mapUint32Uint32_codec);
+ mapUint64Uint64_.WriteTo(ref output, _map_mapUint64Uint64_codec);
+ mapSint32Sint32_.WriteTo(ref output, _map_mapSint32Sint32_codec);
+ mapSint64Sint64_.WriteTo(ref output, _map_mapSint64Sint64_codec);
+ mapFixed32Fixed32_.WriteTo(ref output, _map_mapFixed32Fixed32_codec);
+ mapFixed64Fixed64_.WriteTo(ref output, _map_mapFixed64Fixed64_codec);
+ mapSfixed32Sfixed32_.WriteTo(ref output, _map_mapSfixed32Sfixed32_codec);
+ mapSfixed64Sfixed64_.WriteTo(ref output, _map_mapSfixed64Sfixed64_codec);
+ mapInt32Float_.WriteTo(ref output, _map_mapInt32Float_codec);
+ mapInt32Double_.WriteTo(ref output, _map_mapInt32Double_codec);
+ mapBoolBool_.WriteTo(ref output, _map_mapBoolBool_codec);
+ mapInt32Enum_.WriteTo(ref output, _map_mapInt32Enum_codec);
+ mapInt32ForeignMessage_.WriteTo(ref output, _map_mapInt32ForeignMessage_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += mapInt32Int32_.CalculateSize(_map_mapInt32Int32_codec);
+ size += mapInt64Int64_.CalculateSize(_map_mapInt64Int64_codec);
+ size += mapUint32Uint32_.CalculateSize(_map_mapUint32Uint32_codec);
+ size += mapUint64Uint64_.CalculateSize(_map_mapUint64Uint64_codec);
+ size += mapSint32Sint32_.CalculateSize(_map_mapSint32Sint32_codec);
+ size += mapSint64Sint64_.CalculateSize(_map_mapSint64Sint64_codec);
+ size += mapFixed32Fixed32_.CalculateSize(_map_mapFixed32Fixed32_codec);
+ size += mapFixed64Fixed64_.CalculateSize(_map_mapFixed64Fixed64_codec);
+ size += mapSfixed32Sfixed32_.CalculateSize(_map_mapSfixed32Sfixed32_codec);
+ size += mapSfixed64Sfixed64_.CalculateSize(_map_mapSfixed64Sfixed64_codec);
+ size += mapInt32Float_.CalculateSize(_map_mapInt32Float_codec);
+ size += mapInt32Double_.CalculateSize(_map_mapInt32Double_codec);
+ size += mapBoolBool_.CalculateSize(_map_mapBoolBool_codec);
+ size += mapInt32Enum_.CalculateSize(_map_mapInt32Enum_codec);
+ size += mapInt32ForeignMessage_.CalculateSize(_map_mapInt32ForeignMessage_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(TestArenaMap? other) {
+ if (other == null) {
+ return;
+ }
+ mapInt32Int32_.MergeFrom(other.mapInt32Int32_);
+ mapInt64Int64_.MergeFrom(other.mapInt64Int64_);
+ mapUint32Uint32_.MergeFrom(other.mapUint32Uint32_);
+ mapUint64Uint64_.MergeFrom(other.mapUint64Uint64_);
+ mapSint32Sint32_.MergeFrom(other.mapSint32Sint32_);
+ mapSint64Sint64_.MergeFrom(other.mapSint64Sint64_);
+ mapFixed32Fixed32_.MergeFrom(other.mapFixed32Fixed32_);
+ mapFixed64Fixed64_.MergeFrom(other.mapFixed64Fixed64_);
+ mapSfixed32Sfixed32_.MergeFrom(other.mapSfixed32Sfixed32_);
+ mapSfixed64Sfixed64_.MergeFrom(other.mapSfixed64Sfixed64_);
+ mapInt32Float_.MergeFrom(other.mapInt32Float_);
+ mapInt32Double_.MergeFrom(other.mapInt32Double_);
+ mapBoolBool_.MergeFrom(other.mapBoolBool_);
+ mapInt32Enum_.MergeFrom(other.mapInt32Enum_);
+ mapInt32ForeignMessage_.MergeFrom(other.mapInt32ForeignMessage_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ mapInt32Int32_.AddEntriesFrom(input, _map_mapInt32Int32_codec);
+ break;
+ }
+ case 18: {
+ mapInt64Int64_.AddEntriesFrom(input, _map_mapInt64Int64_codec);
+ break;
+ }
+ case 26: {
+ mapUint32Uint32_.AddEntriesFrom(input, _map_mapUint32Uint32_codec);
+ break;
+ }
+ case 34: {
+ mapUint64Uint64_.AddEntriesFrom(input, _map_mapUint64Uint64_codec);
+ break;
+ }
+ case 42: {
+ mapSint32Sint32_.AddEntriesFrom(input, _map_mapSint32Sint32_codec);
+ break;
+ }
+ case 50: {
+ mapSint64Sint64_.AddEntriesFrom(input, _map_mapSint64Sint64_codec);
+ break;
+ }
+ case 58: {
+ mapFixed32Fixed32_.AddEntriesFrom(input, _map_mapFixed32Fixed32_codec);
+ break;
+ }
+ case 66: {
+ mapFixed64Fixed64_.AddEntriesFrom(input, _map_mapFixed64Fixed64_codec);
+ break;
+ }
+ case 74: {
+ mapSfixed32Sfixed32_.AddEntriesFrom(input, _map_mapSfixed32Sfixed32_codec);
+ break;
+ }
+ case 82: {
+ mapSfixed64Sfixed64_.AddEntriesFrom(input, _map_mapSfixed64Sfixed64_codec);
+ break;
+ }
+ case 90: {
+ mapInt32Float_.AddEntriesFrom(input, _map_mapInt32Float_codec);
+ break;
+ }
+ case 98: {
+ mapInt32Double_.AddEntriesFrom(input, _map_mapInt32Double_codec);
+ break;
+ }
+ case 106: {
+ mapBoolBool_.AddEntriesFrom(input, _map_mapBoolBool_codec);
+ break;
+ }
+ case 114: {
+ mapInt32Enum_.AddEntriesFrom(input, _map_mapInt32Enum_codec);
+ break;
+ }
+ case 122: {
+ mapInt32ForeignMessage_.AddEntriesFrom(input, _map_mapInt32ForeignMessage_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ mapInt32Int32_.AddEntriesFrom(ref input, _map_mapInt32Int32_codec);
+ break;
+ }
+ case 18: {
+ mapInt64Int64_.AddEntriesFrom(ref input, _map_mapInt64Int64_codec);
+ break;
+ }
+ case 26: {
+ mapUint32Uint32_.AddEntriesFrom(ref input, _map_mapUint32Uint32_codec);
+ break;
+ }
+ case 34: {
+ mapUint64Uint64_.AddEntriesFrom(ref input, _map_mapUint64Uint64_codec);
+ break;
+ }
+ case 42: {
+ mapSint32Sint32_.AddEntriesFrom(ref input, _map_mapSint32Sint32_codec);
+ break;
+ }
+ case 50: {
+ mapSint64Sint64_.AddEntriesFrom(ref input, _map_mapSint64Sint64_codec);
+ break;
+ }
+ case 58: {
+ mapFixed32Fixed32_.AddEntriesFrom(ref input, _map_mapFixed32Fixed32_codec);
+ break;
+ }
+ case 66: {
+ mapFixed64Fixed64_.AddEntriesFrom(ref input, _map_mapFixed64Fixed64_codec);
+ break;
+ }
+ case 74: {
+ mapSfixed32Sfixed32_.AddEntriesFrom(ref input, _map_mapSfixed32Sfixed32_codec);
+ break;
+ }
+ case 82: {
+ mapSfixed64Sfixed64_.AddEntriesFrom(ref input, _map_mapSfixed64Sfixed64_codec);
+ break;
+ }
+ case 90: {
+ mapInt32Float_.AddEntriesFrom(ref input, _map_mapInt32Float_codec);
+ break;
+ }
+ case 98: {
+ mapInt32Double_.AddEntriesFrom(ref input, _map_mapInt32Double_codec);
+ break;
+ }
+ case 106: {
+ mapBoolBool_.AddEntriesFrom(ref input, _map_mapBoolBool_codec);
+ break;
+ }
+ case 114: {
+ mapInt32Enum_.AddEntriesFrom(ref input, _map_mapInt32Enum_codec);
+ break;
+ }
+ case 122: {
+ mapInt32ForeignMessage_.AddEntriesFrom(ref input, _map_mapInt32ForeignMessage_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ ///
+ /// Previously, message containing enum called Type cannot be used as value of
+ /// map field.
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class MessageContainingEnumCalledType : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageContainingEnumCalledType());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[5]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public MessageContainingEnumCalledType() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public MessageContainingEnumCalledType(MessageContainingEnumCalledType other) : this() {
+ type_ = other.type_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public MessageContainingEnumCalledType Clone() {
+ return new MessageContainingEnumCalledType(this);
+ }
+
+ /// Field number for the "type" field.
+ public const int TypeFieldNumber = 1;
+ private static readonly pbc::MapField.Codec _map_type_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.TestProtos.MessageContainingEnumCalledType.Parser), 10);
+ private readonly pbc::MapField type_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::MapField Type {
+ get { return type_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object? other) {
+ return Equals(other as MessageContainingEnumCalledType);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(MessageContainingEnumCalledType? other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Type.Equals(other.Type)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= Type.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ type_.WriteTo(output, _map_type_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ type_.WriteTo(ref output, _map_type_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += type_.CalculateSize(_map_type_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(MessageContainingEnumCalledType? other) {
+ if (other == null) {
+ return;
+ }
+ type_.MergeFrom(other.type_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ type_.AddEntriesFrom(input, _map_type_codec);
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ if ((tag & 7) == 4) {
+ // Abort on any end group tag.
+ return;
+ }
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ type_.AddEntriesFrom(ref input, _map_type_codec);
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ #region Nested types
+ /// Container for nested types declared in the MessageContainingEnumCalledType message type.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static partial class Types {
+ public enum Type {
+ [pbr::OriginalName("TYPE_FOO")] Foo = 0,
+ }
+
+ }
+ #endregion
+
+ }
+
+ ///
+ /// Previously, message cannot contain map field called "entry".
+ ///
+ [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
+ public sealed partial class MessageContainingMapCalledEntry : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MessageContainingMapCalledEntry());
+ private pb::UnknownFieldSet? _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Google.Protobuf.TestProtos.MapUnittestProto3Reflection.Descriptor.MessageTypes[6]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public MessageContainingMapCalledEntry() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public MessageContainingMapCalledEntry(MessageContainingMapCalledEntry other) : this() {
+ entry_ = other.entry_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public MessageContainingMapCalledEntry Clone() {
+ return new MessageContainingMapCalledEntry(this);
+ }
+
+ /// Field number for the "entry" field.
+ public const int EntryFieldNumber = 1;
+ private static readonly pbc::MapField.Codec _map_entry_codec
+ = new pbc::MapField