aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs')
-rw-r--r--csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs305
1 files changed, 254 insertions, 51 deletions
diff --git a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
index ae12f4a4..fe913802 100644
--- a/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
+++ b/csharp/src/Google.Protobuf.Test/TestProtos/UnittestWellKnownTypes.cs
@@ -1,5 +1,7 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/unittest_well_known_types.proto
+// <auto-generated>
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/protobuf/unittest_well_known_types.proto
+// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
@@ -10,7 +12,6 @@ using scg = global::System.Collections.Generic;
namespace Google.Protobuf.TestProtos {
/// <summary>Holder for reflection information generated from google/protobuf/unittest_well_known_types.proto</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class UnittestWellKnownTypesReflection {
#region Descriptor
@@ -174,39 +175,44 @@ namespace Google.Protobuf.TestProtos {
}
#region Messages
/// <summary>
- /// Test that we can include all well-known types.
- /// Each wrapper type is included separately, as languages
- /// map handle different wrappers in different ways.
+ /// Test that we can include all well-known types.
+ /// Each wrapper type is included separately, as languages
+ /// map handle different wrappers in different ways.
/// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestWellKnownTypes : pb::IMessage<TestWellKnownTypes> {
private static readonly pb::MessageParser<TestWellKnownTypes> _parser = new pb::MessageParser<TestWellKnownTypes>(() => new TestWellKnownTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<TestWellKnownTypes> Parser { get { return _parser; } }
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypesReflection.Descriptor.MessageTypes[0]; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TestWellKnownTypes() {
OnConstruction();
}
partial void OnConstruction();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TestWellKnownTypes(TestWellKnownTypes other) : this() {
- AnyField = other.anyField_ != null ? other.AnyField.Clone() : null;
- ApiField = other.apiField_ != null ? other.ApiField.Clone() : null;
- DurationField = other.durationField_ != null ? other.DurationField.Clone() : null;
- EmptyField = other.emptyField_ != null ? other.EmptyField.Clone() : null;
- FieldMaskField = other.fieldMaskField_ != null ? other.FieldMaskField.Clone() : null;
- SourceContextField = other.sourceContextField_ != null ? other.SourceContextField.Clone() : null;
- StructField = other.structField_ != null ? other.StructField.Clone() : null;
- TimestampField = other.timestampField_ != null ? other.TimestampField.Clone() : null;
- TypeField = other.typeField_ != null ? other.TypeField.Clone() : null;
+ anyField_ = other.anyField_ != null ? other.anyField_.Clone() : null;
+ apiField_ = other.apiField_ != null ? other.apiField_.Clone() : null;
+ durationField_ = other.durationField_ != null ? other.durationField_.Clone() : null;
+ emptyField_ = other.emptyField_ != null ? other.emptyField_.Clone() : null;
+ fieldMaskField_ = other.fieldMaskField_ != null ? other.fieldMaskField_.Clone() : null;
+ sourceContextField_ = other.sourceContextField_ != null ? other.sourceContextField_.Clone() : null;
+ structField_ = other.structField_ != null ? other.structField_.Clone() : null;
+ timestampField_ = other.timestampField_ != null ? other.timestampField_.Clone() : null;
+ typeField_ = other.typeField_ != null ? other.typeField_.Clone() : null;
DoubleField = other.DoubleField;
FloatField = other.FloatField;
Int64Field = other.Int64Field;
@@ -216,9 +222,11 @@ namespace Google.Protobuf.TestProtos {
BoolField = other.BoolField;
StringField = other.StringField;
BytesField = other.BytesField;
- ValueField = other.valueField_ != null ? other.ValueField.Clone() : null;
+ valueField_ = other.valueField_ != null ? other.valueField_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TestWellKnownTypes Clone() {
return new TestWellKnownTypes(this);
}
@@ -226,6 +234,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "any_field" field.</summary>
public const int AnyFieldFieldNumber = 1;
private global::Google.Protobuf.WellKnownTypes.Any anyField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Any AnyField {
get { return anyField_; }
set {
@@ -236,6 +245,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "api_field" field.</summary>
public const int ApiFieldFieldNumber = 2;
private global::Google.Protobuf.WellKnownTypes.Api apiField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Api ApiField {
get { return apiField_; }
set {
@@ -246,6 +256,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "duration_field" field.</summary>
public const int DurationFieldFieldNumber = 3;
private global::Google.Protobuf.WellKnownTypes.Duration durationField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Duration DurationField {
get { return durationField_; }
set {
@@ -256,6 +267,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "empty_field" field.</summary>
public const int EmptyFieldFieldNumber = 4;
private global::Google.Protobuf.WellKnownTypes.Empty emptyField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Empty EmptyField {
get { return emptyField_; }
set {
@@ -266,6 +278,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "field_mask_field" field.</summary>
public const int FieldMaskFieldFieldNumber = 5;
private global::Google.Protobuf.WellKnownTypes.FieldMask fieldMaskField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.FieldMask FieldMaskField {
get { return fieldMaskField_; }
set {
@@ -276,6 +289,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "source_context_field" field.</summary>
public const int SourceContextFieldFieldNumber = 6;
private global::Google.Protobuf.WellKnownTypes.SourceContext sourceContextField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContextField {
get { return sourceContextField_; }
set {
@@ -286,6 +300,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "struct_field" field.</summary>
public const int StructFieldFieldNumber = 7;
private global::Google.Protobuf.WellKnownTypes.Struct structField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Struct StructField {
get { return structField_; }
set {
@@ -296,6 +311,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "timestamp_field" field.</summary>
public const int TimestampFieldFieldNumber = 8;
private global::Google.Protobuf.WellKnownTypes.Timestamp timestampField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Timestamp TimestampField {
get { return timestampField_; }
set {
@@ -306,6 +322,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "type_field" field.</summary>
public const int TypeFieldFieldNumber = 9;
private global::Google.Protobuf.WellKnownTypes.Type typeField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Type TypeField {
get { return typeField_; }
set {
@@ -317,6 +334,7 @@ namespace Google.Protobuf.TestProtos {
public const int DoubleFieldFieldNumber = 10;
private static readonly pb::FieldCodec<double?> _single_doubleField_codec = pb::FieldCodec.ForStructWrapper<double>(82);
private double? doubleField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double? DoubleField {
get { return doubleField_; }
set {
@@ -328,6 +346,7 @@ namespace Google.Protobuf.TestProtos {
public const int FloatFieldFieldNumber = 11;
private static readonly pb::FieldCodec<float?> _single_floatField_codec = pb::FieldCodec.ForStructWrapper<float>(90);
private float? floatField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float? FloatField {
get { return floatField_; }
set {
@@ -339,6 +358,7 @@ namespace Google.Protobuf.TestProtos {
public const int Int64FieldFieldNumber = 12;
private static readonly pb::FieldCodec<long?> _single_int64Field_codec = pb::FieldCodec.ForStructWrapper<long>(98);
private long? int64Field_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long? Int64Field {
get { return int64Field_; }
set {
@@ -350,6 +370,7 @@ namespace Google.Protobuf.TestProtos {
public const int Uint64FieldFieldNumber = 13;
private static readonly pb::FieldCodec<ulong?> _single_uint64Field_codec = pb::FieldCodec.ForStructWrapper<ulong>(106);
private ulong? uint64Field_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ulong? Uint64Field {
get { return uint64Field_; }
set {
@@ -361,6 +382,7 @@ namespace Google.Protobuf.TestProtos {
public const int Int32FieldFieldNumber = 14;
private static readonly pb::FieldCodec<int?> _single_int32Field_codec = pb::FieldCodec.ForStructWrapper<int>(114);
private int? int32Field_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int? Int32Field {
get { return int32Field_; }
set {
@@ -372,6 +394,7 @@ namespace Google.Protobuf.TestProtos {
public const int Uint32FieldFieldNumber = 15;
private static readonly pb::FieldCodec<uint?> _single_uint32Field_codec = pb::FieldCodec.ForStructWrapper<uint>(122);
private uint? uint32Field_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint? Uint32Field {
get { return uint32Field_; }
set {
@@ -383,6 +406,7 @@ namespace Google.Protobuf.TestProtos {
public const int BoolFieldFieldNumber = 16;
private static readonly pb::FieldCodec<bool?> _single_boolField_codec = pb::FieldCodec.ForStructWrapper<bool>(130);
private bool? boolField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool? BoolField {
get { return boolField_; }
set {
@@ -394,6 +418,7 @@ namespace Google.Protobuf.TestProtos {
public const int StringFieldFieldNumber = 17;
private static readonly pb::FieldCodec<string> _single_stringField_codec = pb::FieldCodec.ForClassWrapper<string>(138);
private string stringField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string StringField {
get { return stringField_; }
set {
@@ -405,6 +430,7 @@ namespace Google.Protobuf.TestProtos {
public const int BytesFieldFieldNumber = 18;
private static readonly pb::FieldCodec<pb::ByteString> _single_bytesField_codec = pb::FieldCodec.ForClassWrapper<pb::ByteString>(146);
private pb::ByteString bytesField_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pb::ByteString BytesField {
get { return bytesField_; }
set {
@@ -416,8 +442,9 @@ namespace Google.Protobuf.TestProtos {
public const int ValueFieldFieldNumber = 19;
private global::Google.Protobuf.WellKnownTypes.Value valueField_;
/// <summary>
- /// Part of struct, but useful to be able to test separately
+ /// Part of struct, but useful to be able to test separately
/// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Value ValueField {
get { return valueField_; }
set {
@@ -425,10 +452,12 @@ namespace Google.Protobuf.TestProtos {
}
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as TestWellKnownTypes);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(TestWellKnownTypes other) {
if (ReferenceEquals(other, null)) {
return false;
@@ -445,8 +474,8 @@ namespace Google.Protobuf.TestProtos {
if (!object.Equals(StructField, other.StructField)) return false;
if (!object.Equals(TimestampField, other.TimestampField)) return false;
if (!object.Equals(TypeField, other.TypeField)) return false;
- if (DoubleField != other.DoubleField) return false;
- if (FloatField != other.FloatField) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.Equals(DoubleField, other.DoubleField)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.Equals(FloatField, other.FloatField)) return false;
if (Int64Field != other.Int64Field) return false;
if (Uint64Field != other.Uint64Field) return false;
if (Int32Field != other.Int32Field) return false;
@@ -455,9 +484,10 @@ namespace Google.Protobuf.TestProtos {
if (StringField != other.StringField) return false;
if (BytesField != other.BytesField) return false;
if (!object.Equals(ValueField, other.ValueField)) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (anyField_ != null) hash ^= AnyField.GetHashCode();
@@ -469,8 +499,8 @@ namespace Google.Protobuf.TestProtos {
if (structField_ != null) hash ^= StructField.GetHashCode();
if (timestampField_ != null) hash ^= TimestampField.GetHashCode();
if (typeField_ != null) hash ^= TypeField.GetHashCode();
- if (doubleField_ != null) hash ^= DoubleField.GetHashCode();
- if (floatField_ != null) hash ^= FloatField.GetHashCode();
+ if (doubleField_ != null) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(DoubleField);
+ if (floatField_ != null) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.GetHashCode(FloatField);
if (int64Field_ != null) hash ^= Int64Field.GetHashCode();
if (uint64Field_ != null) hash ^= Uint64Field.GetHashCode();
if (int32Field_ != null) hash ^= Int32Field.GetHashCode();
@@ -479,13 +509,18 @@ namespace Google.Protobuf.TestProtos {
if (stringField_ != null) hash ^= StringField.GetHashCode();
if (bytesField_ != null) hash ^= BytesField.GetHashCode();
if (valueField_ != null) hash ^= ValueField.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (anyField_ != null) {
output.WriteRawTag(10);
@@ -554,8 +589,12 @@ namespace Google.Protobuf.TestProtos {
output.WriteRawTag(154, 1);
output.WriteMessage(ValueField);
}
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (anyField_ != null) {
@@ -615,9 +654,13 @@ namespace Google.Protobuf.TestProtos {
if (valueField_ != null) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(ValueField);
}
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(TestWellKnownTypes other) {
if (other == null) {
return;
@@ -727,14 +770,16 @@ namespace Google.Protobuf.TestProtos {
}
ValueField.MergeFrom(other.ValueField);
}
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
if (anyField_ == null) {
@@ -876,27 +921,32 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// A repeated field for each well-known type.
+ /// A repeated field for each well-known type.
/// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class RepeatedWellKnownTypes : pb::IMessage<RepeatedWellKnownTypes> {
private static readonly pb::MessageParser<RepeatedWellKnownTypes> _parser = new pb::MessageParser<RepeatedWellKnownTypes>(() => new RepeatedWellKnownTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<RepeatedWellKnownTypes> Parser { get { return _parser; } }
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypesReflection.Descriptor.MessageTypes[1]; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RepeatedWellKnownTypes() {
OnConstruction();
}
partial void OnConstruction();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RepeatedWellKnownTypes(RepeatedWellKnownTypes other) : this() {
anyField_ = other.anyField_.Clone();
apiField_ = other.apiField_.Clone();
@@ -916,8 +966,10 @@ namespace Google.Protobuf.TestProtos {
boolField_ = other.boolField_.Clone();
stringField_ = other.stringField_.Clone();
bytesField_ = other.bytesField_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public RepeatedWellKnownTypes Clone() {
return new RepeatedWellKnownTypes(this);
}
@@ -927,6 +979,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Any> _repeated_anyField_codec
= pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Any.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> anyField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Any> AnyField {
get { return anyField_; }
}
@@ -936,6 +989,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Api> _repeated_apiField_codec
= pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Api.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Api> apiField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Api>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Api> ApiField {
get { return apiField_; }
}
@@ -945,6 +999,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Duration> _repeated_durationField_codec
= pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Duration.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> durationField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Duration> DurationField {
get { return durationField_; }
}
@@ -954,6 +1009,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Empty> _repeated_emptyField_codec
= pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Empty.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Empty> emptyField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Empty>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Empty> EmptyField {
get { return emptyField_; }
}
@@ -963,6 +1019,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.FieldMask> _repeated_fieldMaskField_codec
= pb::FieldCodec.ForMessage(42, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> fieldMaskField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.FieldMask> FieldMaskField {
get { return fieldMaskField_; }
}
@@ -972,6 +1029,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.SourceContext> _repeated_sourceContextField_codec
= pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.SourceContext.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.SourceContext> sourceContextField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.SourceContext>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.SourceContext> SourceContextField {
get { return sourceContextField_; }
}
@@ -981,6 +1039,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Struct> _repeated_structField_codec
= pb::FieldCodec.ForMessage(58, global::Google.Protobuf.WellKnownTypes.Struct.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> structField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Struct> StructField {
get { return structField_; }
}
@@ -990,6 +1049,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Timestamp> _repeated_timestampField_codec
= pb::FieldCodec.ForMessage(66, global::Google.Protobuf.WellKnownTypes.Timestamp.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> timestampField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Timestamp> TimestampField {
get { return timestampField_; }
}
@@ -999,6 +1059,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Type> _repeated_typeField_codec
= pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Type.Parser);
private readonly pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Type> typeField_ = new pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Type>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::Google.Protobuf.WellKnownTypes.Type> TypeField {
get { return typeField_; }
}
@@ -1009,8 +1070,9 @@ namespace Google.Protobuf.TestProtos {
= pb::FieldCodec.ForStructWrapper<double>(82);
private readonly pbc::RepeatedField<double?> doubleField_ = new pbc::RepeatedField<double?>();
/// <summary>
- /// These don't actually make a lot of sense, but they're not prohibited...
+ /// These don't actually make a lot of sense, but they're not prohibited...
/// </summary>
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<double?> DoubleField {
get { return doubleField_; }
}
@@ -1020,6 +1082,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<float?> _repeated_floatField_codec
= pb::FieldCodec.ForStructWrapper<float>(90);
private readonly pbc::RepeatedField<float?> floatField_ = new pbc::RepeatedField<float?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<float?> FloatField {
get { return floatField_; }
}
@@ -1029,6 +1092,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<long?> _repeated_int64Field_codec
= pb::FieldCodec.ForStructWrapper<long>(98);
private readonly pbc::RepeatedField<long?> int64Field_ = new pbc::RepeatedField<long?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<long?> Int64Field {
get { return int64Field_; }
}
@@ -1038,6 +1102,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<ulong?> _repeated_uint64Field_codec
= pb::FieldCodec.ForStructWrapper<ulong>(106);
private readonly pbc::RepeatedField<ulong?> uint64Field_ = new pbc::RepeatedField<ulong?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<ulong?> Uint64Field {
get { return uint64Field_; }
}
@@ -1047,6 +1112,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<int?> _repeated_int32Field_codec
= pb::FieldCodec.ForStructWrapper<int>(114);
private readonly pbc::RepeatedField<int?> int32Field_ = new pbc::RepeatedField<int?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<int?> Int32Field {
get { return int32Field_; }
}
@@ -1056,6 +1122,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<uint?> _repeated_uint32Field_codec
= pb::FieldCodec.ForStructWrapper<uint>(122);
private readonly pbc::RepeatedField<uint?> uint32Field_ = new pbc::RepeatedField<uint?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<uint?> Uint32Field {
get { return uint32Field_; }
}
@@ -1065,6 +1132,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<bool?> _repeated_boolField_codec
= pb::FieldCodec.ForStructWrapper<bool>(130);
private readonly pbc::RepeatedField<bool?> boolField_ = new pbc::RepeatedField<bool?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<bool?> BoolField {
get { return boolField_; }
}
@@ -1074,6 +1142,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<string> _repeated_stringField_codec
= pb::FieldCodec.ForClassWrapper<string>(138);
private readonly pbc::RepeatedField<string> stringField_ = new pbc::RepeatedField<string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<string> StringField {
get { return stringField_; }
}
@@ -1083,14 +1152,17 @@ namespace Google.Protobuf.TestProtos {
private static readonly pb::FieldCodec<pb::ByteString> _repeated_bytesField_codec
= pb::FieldCodec.ForClassWrapper<pb::ByteString>(146);
private readonly pbc::RepeatedField<pb::ByteString> bytesField_ = new pbc::RepeatedField<pb::ByteString>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<pb::ByteString> BytesField {
get { return bytesField_; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as RepeatedWellKnownTypes);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(RepeatedWellKnownTypes other) {
if (ReferenceEquals(other, null)) {
return false;
@@ -1116,9 +1188,10 @@ namespace Google.Protobuf.TestProtos {
if(!boolField_.Equals(other.boolField_)) return false;
if(!stringField_.Equals(other.stringField_)) return false;
if(!bytesField_.Equals(other.bytesField_)) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= anyField_.GetHashCode();
@@ -1139,13 +1212,18 @@ namespace Google.Protobuf.TestProtos {
hash ^= boolField_.GetHashCode();
hash ^= stringField_.GetHashCode();
hash ^= bytesField_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
anyField_.WriteTo(output, _repeated_anyField_codec);
apiField_.WriteTo(output, _repeated_apiField_codec);
@@ -1165,8 +1243,12 @@ namespace Google.Protobuf.TestProtos {
boolField_.WriteTo(output, _repeated_boolField_codec);
stringField_.WriteTo(output, _repeated_stringField_codec);
bytesField_.WriteTo(output, _repeated_bytesField_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += anyField_.CalculateSize(_repeated_anyField_codec);
@@ -1187,9 +1269,13 @@ namespace Google.Protobuf.TestProtos {
size += boolField_.CalculateSize(_repeated_boolField_codec);
size += stringField_.CalculateSize(_repeated_stringField_codec);
size += bytesField_.CalculateSize(_repeated_bytesField_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(RepeatedWellKnownTypes other) {
if (other == null) {
return;
@@ -1212,14 +1298,16 @@ namespace Google.Protobuf.TestProtos {
boolField_.Add(other.boolField_);
stringField_.Add(other.stringField_);
bytesField_.Add(other.bytesField_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
anyField_.AddEntriesFrom(input, _repeated_anyField_codec);
@@ -1299,25 +1387,30 @@ namespace Google.Protobuf.TestProtos {
}
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class OneofWellKnownTypes : pb::IMessage<OneofWellKnownTypes> {
private static readonly pb::MessageParser<OneofWellKnownTypes> _parser = new pb::MessageParser<OneofWellKnownTypes>(() => new OneofWellKnownTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<OneofWellKnownTypes> Parser { get { return _parser; } }
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypesReflection.Descriptor.MessageTypes[2]; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public OneofWellKnownTypes() {
OnConstruction();
}
partial void OnConstruction();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public OneofWellKnownTypes(OneofWellKnownTypes other) : this() {
switch (other.OneofFieldCase) {
case OneofFieldOneofCase.AnyField:
@@ -1376,14 +1469,17 @@ namespace Google.Protobuf.TestProtos {
break;
}
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public OneofWellKnownTypes Clone() {
return new OneofWellKnownTypes(this);
}
/// <summary>Field number for the "any_field" field.</summary>
public const int AnyFieldFieldNumber = 1;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Any AnyField {
get { return oneofFieldCase_ == OneofFieldOneofCase.AnyField ? (global::Google.Protobuf.WellKnownTypes.Any) oneofField_ : null; }
set {
@@ -1394,6 +1490,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "api_field" field.</summary>
public const int ApiFieldFieldNumber = 2;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Api ApiField {
get { return oneofFieldCase_ == OneofFieldOneofCase.ApiField ? (global::Google.Protobuf.WellKnownTypes.Api) oneofField_ : null; }
set {
@@ -1404,6 +1501,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "duration_field" field.</summary>
public const int DurationFieldFieldNumber = 3;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Duration DurationField {
get { return oneofFieldCase_ == OneofFieldOneofCase.DurationField ? (global::Google.Protobuf.WellKnownTypes.Duration) oneofField_ : null; }
set {
@@ -1414,6 +1512,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "empty_field" field.</summary>
public const int EmptyFieldFieldNumber = 4;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Empty EmptyField {
get { return oneofFieldCase_ == OneofFieldOneofCase.EmptyField ? (global::Google.Protobuf.WellKnownTypes.Empty) oneofField_ : null; }
set {
@@ -1424,6 +1523,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "field_mask_field" field.</summary>
public const int FieldMaskFieldFieldNumber = 5;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.FieldMask FieldMaskField {
get { return oneofFieldCase_ == OneofFieldOneofCase.FieldMaskField ? (global::Google.Protobuf.WellKnownTypes.FieldMask) oneofField_ : null; }
set {
@@ -1434,6 +1534,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "source_context_field" field.</summary>
public const int SourceContextFieldFieldNumber = 6;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.SourceContext SourceContextField {
get { return oneofFieldCase_ == OneofFieldOneofCase.SourceContextField ? (global::Google.Protobuf.WellKnownTypes.SourceContext) oneofField_ : null; }
set {
@@ -1444,6 +1545,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "struct_field" field.</summary>
public const int StructFieldFieldNumber = 7;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Struct StructField {
get { return oneofFieldCase_ == OneofFieldOneofCase.StructField ? (global::Google.Protobuf.WellKnownTypes.Struct) oneofField_ : null; }
set {
@@ -1454,6 +1556,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "timestamp_field" field.</summary>
public const int TimestampFieldFieldNumber = 8;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Timestamp TimestampField {
get { return oneofFieldCase_ == OneofFieldOneofCase.TimestampField ? (global::Google.Protobuf.WellKnownTypes.Timestamp) oneofField_ : null; }
set {
@@ -1464,6 +1567,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "type_field" field.</summary>
public const int TypeFieldFieldNumber = 9;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Google.Protobuf.WellKnownTypes.Type TypeField {
get { return oneofFieldCase_ == OneofFieldOneofCase.TypeField ? (global::Google.Protobuf.WellKnownTypes.Type) oneofField_ : null; }
set {
@@ -1475,6 +1579,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "double_field" field.</summary>
public const int DoubleFieldFieldNumber = 10;
private static readonly pb::FieldCodec<double?> _oneof_doubleField_codec = pb::FieldCodec.ForStructWrapper<double>(82);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double? DoubleField {
get { return oneofFieldCase_ == OneofFieldOneofCase.DoubleField ? (double?) oneofField_ : (double?) null; }
set {
@@ -1486,6 +1591,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "float_field" field.</summary>
public const int FloatFieldFieldNumber = 11;
private static readonly pb::FieldCodec<float?> _oneof_floatField_codec = pb::FieldCodec.ForStructWrapper<float>(90);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public float? FloatField {
get { return oneofFieldCase_ == OneofFieldOneofCase.FloatField ? (float?) oneofField_ : (float?) null; }
set {
@@ -1497,6 +1603,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "int64_field" field.</summary>
public const int Int64FieldFieldNumber = 12;
private static readonly pb::FieldCodec<long?> _oneof_int64Field_codec = pb::FieldCodec.ForStructWrapper<long>(98);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long? Int64Field {
get { return oneofFieldCase_ == OneofFieldOneofCase.Int64Field ? (long?) oneofField_ : (long?) null; }
set {
@@ -1508,6 +1615,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "uint64_field" field.</summary>
public const int Uint64FieldFieldNumber = 13;
private static readonly pb::FieldCodec<ulong?> _oneof_uint64Field_codec = pb::FieldCodec.ForStructWrapper<ulong>(106);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ulong? Uint64Field {
get { return oneofFieldCase_ == OneofFieldOneofCase.Uint64Field ? (ulong?) oneofField_ : (ulong?) null; }
set {
@@ -1519,6 +1627,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "int32_field" field.</summary>
public const int Int32FieldFieldNumber = 14;
private static readonly pb::FieldCodec<int?> _oneof_int32Field_codec = pb::FieldCodec.ForStructWrapper<int>(114);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int? Int32Field {
get { return oneofFieldCase_ == OneofFieldOneofCase.Int32Field ? (int?) oneofField_ : (int?) null; }
set {
@@ -1530,6 +1639,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "uint32_field" field.</summary>
public const int Uint32FieldFieldNumber = 15;
private static readonly pb::FieldCodec<uint?> _oneof_uint32Field_codec = pb::FieldCodec.ForStructWrapper<uint>(122);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public uint? Uint32Field {
get { return oneofFieldCase_ == OneofFieldOneofCase.Uint32Field ? (uint?) oneofField_ : (uint?) null; }
set {
@@ -1541,6 +1651,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "bool_field" field.</summary>
public const int BoolFieldFieldNumber = 16;
private static readonly pb::FieldCodec<bool?> _oneof_boolField_codec = pb::FieldCodec.ForStructWrapper<bool>(130);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool? BoolField {
get { return oneofFieldCase_ == OneofFieldOneofCase.BoolField ? (bool?) oneofField_ : (bool?) null; }
set {
@@ -1552,6 +1663,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "string_field" field.</summary>
public const int StringFieldFieldNumber = 17;
private static readonly pb::FieldCodec<string> _oneof_stringField_codec = pb::FieldCodec.ForClassWrapper<string>(138);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string StringField {
get { return oneofFieldCase_ == OneofFieldOneofCase.StringField ? (string) oneofField_ : (string) null; }
set {
@@ -1563,6 +1675,7 @@ namespace Google.Protobuf.TestProtos {
/// <summary>Field number for the "bytes_field" field.</summary>
public const int BytesFieldFieldNumber = 18;
private static readonly pb::FieldCodec<pb::ByteString> _oneof_bytesField_codec = pb::FieldCodec.ForClassWrapper<pb::ByteString>(146);
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pb::ByteString BytesField {
get { return oneofFieldCase_ == OneofFieldOneofCase.BytesField ? (pb::ByteString) oneofField_ : (pb::ByteString) null; }
set {
@@ -1595,19 +1708,23 @@ namespace Google.Protobuf.TestProtos {
BytesField = 18,
}
private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public OneofFieldOneofCase OneofFieldCase {
get { return oneofFieldCase_; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void ClearOneofField() {
oneofFieldCase_ = OneofFieldOneofCase.None;
oneofField_ = null;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as OneofWellKnownTypes);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(OneofWellKnownTypes other) {
if (ReferenceEquals(other, null)) {
return false;
@@ -1624,8 +1741,8 @@ namespace Google.Protobuf.TestProtos {
if (!object.Equals(StructField, other.StructField)) return false;
if (!object.Equals(TimestampField, other.TimestampField)) return false;
if (!object.Equals(TypeField, other.TypeField)) return false;
- if (DoubleField != other.DoubleField) return false;
- if (FloatField != other.FloatField) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.Equals(DoubleField, other.DoubleField)) return false;
+ if (!pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.Equals(FloatField, other.FloatField)) return false;
if (Int64Field != other.Int64Field) return false;
if (Uint64Field != other.Uint64Field) return false;
if (Int32Field != other.Int32Field) return false;
@@ -1634,9 +1751,10 @@ namespace Google.Protobuf.TestProtos {
if (StringField != other.StringField) return false;
if (BytesField != other.BytesField) return false;
if (OneofFieldCase != other.OneofFieldCase) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (oneofFieldCase_ == OneofFieldOneofCase.AnyField) hash ^= AnyField.GetHashCode();
@@ -1648,8 +1766,8 @@ namespace Google.Protobuf.TestProtos {
if (oneofFieldCase_ == OneofFieldOneofCase.StructField) hash ^= StructField.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.TimestampField) hash ^= TimestampField.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.TypeField) hash ^= TypeField.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.DoubleField) hash ^= DoubleField.GetHashCode();
- if (oneofFieldCase_ == OneofFieldOneofCase.FloatField) hash ^= FloatField.GetHashCode();
+ if (oneofFieldCase_ == OneofFieldOneofCase.DoubleField) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(DoubleField);
+ if (oneofFieldCase_ == OneofFieldOneofCase.FloatField) hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableSingleEqualityComparer.GetHashCode(FloatField);
if (oneofFieldCase_ == OneofFieldOneofCase.Int64Field) hash ^= Int64Field.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.Uint64Field) hash ^= Uint64Field.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.Int32Field) hash ^= Int32Field.GetHashCode();
@@ -1658,13 +1776,18 @@ namespace Google.Protobuf.TestProtos {
if (oneofFieldCase_ == OneofFieldOneofCase.StringField) hash ^= StringField.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.BytesField) hash ^= BytesField.GetHashCode();
hash ^= (int) oneofFieldCase_;
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (oneofFieldCase_ == OneofFieldOneofCase.AnyField) {
output.WriteRawTag(10);
@@ -1729,8 +1852,12 @@ namespace Google.Protobuf.TestProtos {
if (oneofFieldCase_ == OneofFieldOneofCase.BytesField) {
_oneof_bytesField_codec.WriteTagAndValue(output, (pb::ByteString) oneofField_);
}
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (oneofFieldCase_ == OneofFieldOneofCase.AnyField) {
@@ -1787,40 +1914,71 @@ namespace Google.Protobuf.TestProtos {
if (oneofFieldCase_ == OneofFieldOneofCase.BytesField) {
size += _oneof_bytesField_codec.CalculateSizeWithTag(BytesField);
}
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(OneofWellKnownTypes other) {
if (other == null) {
return;
}
switch (other.OneofFieldCase) {
case OneofFieldOneofCase.AnyField:
- AnyField = other.AnyField;
+ if (AnyField == null) {
+ AnyField = new global::Google.Protobuf.WellKnownTypes.Any();
+ }
+ AnyField.MergeFrom(other.AnyField);
break;
case OneofFieldOneofCase.ApiField:
- ApiField = other.ApiField;
+ if (ApiField == null) {
+ ApiField = new global::Google.Protobuf.WellKnownTypes.Api();
+ }
+ ApiField.MergeFrom(other.ApiField);
break;
case OneofFieldOneofCase.DurationField:
- DurationField = other.DurationField;
+ if (DurationField == null) {
+ DurationField = new global::Google.Protobuf.WellKnownTypes.Duration();
+ }
+ DurationField.MergeFrom(other.DurationField);
break;
case OneofFieldOneofCase.EmptyField:
- EmptyField = other.EmptyField;
+ if (EmptyField == null) {
+ EmptyField = new global::Google.Protobuf.WellKnownTypes.Empty();
+ }
+ EmptyField.MergeFrom(other.EmptyField);
break;
case OneofFieldOneofCase.FieldMaskField:
- FieldMaskField = other.FieldMaskField;
+ if (FieldMaskField == null) {
+ FieldMaskField = new global::Google.Protobuf.WellKnownTypes.FieldMask();
+ }
+ FieldMaskField.MergeFrom(other.FieldMaskField);
break;
case OneofFieldOneofCase.SourceContextField:
- SourceContextField = other.SourceContextField;
+ if (SourceContextField == null) {
+ SourceContextField = new global::Google.Protobuf.WellKnownTypes.SourceContext();
+ }
+ SourceContextField.MergeFrom(other.SourceContextField);
break;
case OneofFieldOneofCase.StructField:
- StructField = other.StructField;
+ if (StructField == null) {
+ StructField = new global::Google.Protobuf.WellKnownTypes.Struct();
+ }
+ StructField.MergeFrom(other.StructField);
break;
case OneofFieldOneofCase.TimestampField:
- TimestampField = other.TimestampField;
+ if (TimestampField == null) {
+ TimestampField = new global::Google.Protobuf.WellKnownTypes.Timestamp();
+ }
+ TimestampField.MergeFrom(other.TimestampField);
break;
case OneofFieldOneofCase.TypeField:
- TypeField = other.TypeField;
+ if (TypeField == null) {
+ TypeField = new global::Google.Protobuf.WellKnownTypes.Type();
+ }
+ TypeField.MergeFrom(other.TypeField);
break;
case OneofFieldOneofCase.DoubleField:
DoubleField = other.DoubleField;
@@ -1851,14 +2009,16 @@ namespace Google.Protobuf.TestProtos {
break;
}
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
global::Google.Protobuf.WellKnownTypes.Any subBuilder = new global::Google.Protobuf.WellKnownTypes.Any();
@@ -1984,29 +2144,34 @@ namespace Google.Protobuf.TestProtos {
}
/// <summary>
- /// A map field for each well-known type. We only
- /// need to worry about the value part of the map being the
- /// well-known types, as messages can't be map keys.
+ /// A map field for each well-known type. We only
+ /// need to worry about the value part of the map being the
+ /// well-known types, as messages can't be map keys.
/// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class MapWellKnownTypes : pb::IMessage<MapWellKnownTypes> {
private static readonly pb::MessageParser<MapWellKnownTypes> _parser = new pb::MessageParser<MapWellKnownTypes>(() => new MapWellKnownTypes());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<MapWellKnownTypes> Parser { get { return _parser; } }
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestWellKnownTypesReflection.Descriptor.MessageTypes[3]; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MapWellKnownTypes() {
OnConstruction();
}
partial void OnConstruction();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MapWellKnownTypes(MapWellKnownTypes other) : this() {
anyField_ = other.anyField_.Clone();
apiField_ = other.apiField_.Clone();
@@ -2026,8 +2191,10 @@ namespace Google.Protobuf.TestProtos {
boolField_ = other.boolField_.Clone();
stringField_ = other.stringField_.Clone();
bytesField_ = other.bytesField_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public MapWellKnownTypes Clone() {
return new MapWellKnownTypes(this);
}
@@ -2037,6 +2204,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any>.Codec _map_anyField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Any.Parser), 10);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any> anyField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Any> AnyField {
get { return anyField_; }
}
@@ -2046,6 +2214,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api>.Codec _map_apiField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Api.Parser), 18);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api> apiField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Api> ApiField {
get { return apiField_; }
}
@@ -2055,6 +2224,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration>.Codec _map_durationField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Duration.Parser), 26);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration> durationField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Duration> DurationField {
get { return durationField_; }
}
@@ -2064,6 +2234,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty>.Codec _map_emptyField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Empty.Parser), 34);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty> emptyField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Empty> EmptyField {
get { return emptyField_; }
}
@@ -2073,6 +2244,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask>.Codec _map_fieldMaskField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.FieldMask.Parser), 42);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask> fieldMaskField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.FieldMask> FieldMaskField {
get { return fieldMaskField_; }
}
@@ -2082,6 +2254,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext>.Codec _map_sourceContextField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.SourceContext.Parser), 50);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext> sourceContextField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.SourceContext> SourceContextField {
get { return sourceContextField_; }
}
@@ -2091,6 +2264,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct>.Codec _map_structField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Struct.Parser), 58);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct> structField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Struct> StructField {
get { return structField_; }
}
@@ -2100,6 +2274,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp>.Codec _map_timestampField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Timestamp.Parser), 66);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp> timestampField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Timestamp> TimestampField {
get { return timestampField_; }
}
@@ -2109,6 +2284,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type>.Codec _map_typeField_codec
= new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Type.Parser), 74);
private readonly pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type> typeField_ = new pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, global::Google.Protobuf.WellKnownTypes.Type> TypeField {
get { return typeField_; }
}
@@ -2118,6 +2294,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, double?>.Codec _map_doubleField_codec
= new pbc::MapField<int, double?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<double>(18), 82);
private readonly pbc::MapField<int, double?> doubleField_ = new pbc::MapField<int, double?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, double?> DoubleField {
get { return doubleField_; }
}
@@ -2127,6 +2304,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, float?>.Codec _map_floatField_codec
= new pbc::MapField<int, float?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<float>(18), 90);
private readonly pbc::MapField<int, float?> floatField_ = new pbc::MapField<int, float?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, float?> FloatField {
get { return floatField_; }
}
@@ -2136,6 +2314,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, long?>.Codec _map_int64Field_codec
= new pbc::MapField<int, long?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<long>(18), 98);
private readonly pbc::MapField<int, long?> int64Field_ = new pbc::MapField<int, long?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, long?> Int64Field {
get { return int64Field_; }
}
@@ -2145,6 +2324,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, ulong?>.Codec _map_uint64Field_codec
= new pbc::MapField<int, ulong?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<ulong>(18), 106);
private readonly pbc::MapField<int, ulong?> uint64Field_ = new pbc::MapField<int, ulong?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, ulong?> Uint64Field {
get { return uint64Field_; }
}
@@ -2154,6 +2334,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, int?>.Codec _map_int32Field_codec
= new pbc::MapField<int, int?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<int>(18), 114);
private readonly pbc::MapField<int, int?> int32Field_ = new pbc::MapField<int, int?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, int?> Int32Field {
get { return int32Field_; }
}
@@ -2163,6 +2344,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, uint?>.Codec _map_uint32Field_codec
= new pbc::MapField<int, uint?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<uint>(18), 122);
private readonly pbc::MapField<int, uint?> uint32Field_ = new pbc::MapField<int, uint?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, uint?> Uint32Field {
get { return uint32Field_; }
}
@@ -2172,6 +2354,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, bool?>.Codec _map_boolField_codec
= new pbc::MapField<int, bool?>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForStructWrapper<bool>(18), 130);
private readonly pbc::MapField<int, bool?> boolField_ = new pbc::MapField<int, bool?>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, bool?> BoolField {
get { return boolField_; }
}
@@ -2181,6 +2364,7 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, string>.Codec _map_stringField_codec
= new pbc::MapField<int, string>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForClassWrapper<string>(18), 138);
private readonly pbc::MapField<int, string> stringField_ = new pbc::MapField<int, string>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, string> StringField {
get { return stringField_; }
}
@@ -2190,14 +2374,17 @@ namespace Google.Protobuf.TestProtos {
private static readonly pbc::MapField<int, pb::ByteString>.Codec _map_bytesField_codec
= new pbc::MapField<int, pb::ByteString>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForClassWrapper<pb::ByteString>(18), 146);
private readonly pbc::MapField<int, pb::ByteString> bytesField_ = new pbc::MapField<int, pb::ByteString>();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<int, pb::ByteString> BytesField {
get { return bytesField_; }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as MapWellKnownTypes);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(MapWellKnownTypes other) {
if (ReferenceEquals(other, null)) {
return false;
@@ -2223,9 +2410,10 @@ namespace Google.Protobuf.TestProtos {
if (!BoolField.Equals(other.BoolField)) return false;
if (!StringField.Equals(other.StringField)) return false;
if (!BytesField.Equals(other.BytesField)) return false;
- return true;
+ return Equals(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= AnyField.GetHashCode();
@@ -2246,13 +2434,18 @@ namespace Google.Protobuf.TestProtos {
hash ^= BoolField.GetHashCode();
hash ^= StringField.GetHashCode();
hash ^= BytesField.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
return hash;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
anyField_.WriteTo(output, _map_anyField_codec);
apiField_.WriteTo(output, _map_apiField_codec);
@@ -2272,8 +2465,12 @@ namespace Google.Protobuf.TestProtos {
boolField_.WriteTo(output, _map_boolField_codec);
stringField_.WriteTo(output, _map_stringField_codec);
bytesField_.WriteTo(output, _map_bytesField_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += anyField_.CalculateSize(_map_anyField_codec);
@@ -2294,9 +2491,13 @@ namespace Google.Protobuf.TestProtos {
size += boolField_.CalculateSize(_map_boolField_codec);
size += stringField_.CalculateSize(_map_stringField_codec);
size += bytesField_.CalculateSize(_map_bytesField_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
return size;
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(MapWellKnownTypes other) {
if (other == null) {
return;
@@ -2319,14 +2520,16 @@ namespace Google.Protobuf.TestProtos {
boolField_.Add(other.boolField_);
stringField_.Add(other.stringField_);
bytesField_.Add(other.bytesField_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
- input.SkipLastField();
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
anyField_.AddEntriesFrom(input, _map_anyField_codec);