diff options
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes')
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Any.cs | 22 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Api.cs | 54 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs | 22 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs | 22 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs | 22 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs | 22 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs | 58 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs | 22 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Type.cs | 86 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs | 158 |
10 files changed, 410 insertions, 78 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs index 5b39b809..5836dfff 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Any.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/any.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/any.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -119,6 +121,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Any : pb::IMessage<Any> { private static readonly pb::MessageParser<Any> _parser = new pb::MessageParser<Any>(() => new Any()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Any> Parser { get { return _parser; } } @@ -143,6 +146,7 @@ namespace Google.Protobuf.WellKnownTypes { public Any(Any other) : this() { typeUrl_ = other.typeUrl_; value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -213,7 +217,7 @@ namespace Google.Protobuf.WellKnownTypes { } if (TypeUrl != other.TypeUrl) return false; if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -221,6 +225,9 @@ namespace Google.Protobuf.WellKnownTypes { int hash = 1; if (TypeUrl.Length != 0) hash ^= TypeUrl.GetHashCode(); if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -239,6 +246,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(18); output.WriteBytes(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -250,6 +260,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeBytesSize(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -264,6 +277,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value.Length != 0) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -272,7 +286,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { TypeUrl = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs index 6705e092..4db1f633 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Api.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/api.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/api.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -64,6 +66,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Api : pb::IMessage<Api> { private static readonly pb::MessageParser<Api> _parser = new pb::MessageParser<Api>(() => new Api()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Api> Parser { get { return _parser; } } @@ -93,6 +96,7 @@ namespace Google.Protobuf.WellKnownTypes { SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null; mixins_ = other.mixins_.Clone(); syntax_ = other.syntax_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -235,7 +239,7 @@ namespace Google.Protobuf.WellKnownTypes { if (!object.Equals(SourceContext, other.SourceContext)) return false; if(!mixins_.Equals(other.mixins_)) return false; if (Syntax != other.Syntax) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -248,6 +252,9 @@ namespace Google.Protobuf.WellKnownTypes { if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); hash ^= mixins_.GetHashCode(); if (Syntax != 0) hash ^= Syntax.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -277,6 +284,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(56); output.WriteEnum((int) Syntax); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -297,6 +307,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Syntax != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -323,6 +336,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Syntax != 0) { Syntax = other.Syntax; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -331,7 +345,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); @@ -375,6 +389,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Method : pb::IMessage<Method> { private static readonly pb::MessageParser<Method> _parser = new pb::MessageParser<Method>(() => new Method()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Method> Parser { get { return _parser; } } @@ -404,6 +419,7 @@ namespace Google.Protobuf.WellKnownTypes { responseStreaming_ = other.responseStreaming_; options_ = other.options_.Clone(); syntax_ = other.syntax_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -528,7 +544,7 @@ namespace Google.Protobuf.WellKnownTypes { if (ResponseStreaming != other.ResponseStreaming) return false; if(!options_.Equals(other.options_)) return false; if (Syntax != other.Syntax) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -541,6 +557,9 @@ namespace Google.Protobuf.WellKnownTypes { if (ResponseStreaming != false) hash ^= ResponseStreaming.GetHashCode(); hash ^= options_.GetHashCode(); if (Syntax != 0) hash ^= Syntax.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -576,6 +595,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(56); output.WriteEnum((int) Syntax); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -600,6 +622,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Syntax != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -627,6 +652,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Syntax != 0) { Syntax = other.Syntax; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -635,7 +661,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); @@ -753,6 +779,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Mixin : pb::IMessage<Mixin> { private static readonly pb::MessageParser<Mixin> _parser = new pb::MessageParser<Mixin>(() => new Mixin()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Mixin> Parser { get { return _parser; } } @@ -777,6 +804,7 @@ namespace Google.Protobuf.WellKnownTypes { public Mixin(Mixin other) : this() { name_ = other.name_; root_ = other.root_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -828,7 +856,7 @@ namespace Google.Protobuf.WellKnownTypes { } if (Name != other.Name) return false; if (Root != other.Root) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -836,6 +864,9 @@ namespace Google.Protobuf.WellKnownTypes { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); if (Root.Length != 0) hash ^= Root.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -854,6 +885,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(18); output.WriteString(Root); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -865,6 +899,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Root.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Root); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -879,6 +916,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Root.Length != 0) { Root = other.Root; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -887,7 +925,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs index 94159cb8..2858b532 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/duration.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/duration.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -100,6 +102,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Duration : pb::IMessage<Duration> { private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Duration> Parser { get { return _parser; } } @@ -124,6 +127,7 @@ namespace Google.Protobuf.WellKnownTypes { public Duration(Duration other) : this() { seconds_ = other.seconds_; nanos_ = other.nanos_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -181,7 +185,7 @@ namespace Google.Protobuf.WellKnownTypes { } if (Seconds != other.Seconds) return false; if (Nanos != other.Nanos) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -189,6 +193,9 @@ namespace Google.Protobuf.WellKnownTypes { int hash = 1; if (Seconds != 0L) hash ^= Seconds.GetHashCode(); if (Nanos != 0) hash ^= Nanos.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -207,6 +214,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(16); output.WriteInt32(Nanos); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -218,6 +228,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Nanos != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -232,6 +245,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Nanos != 0) { Nanos = other.Nanos; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -240,7 +254,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Seconds = input.ReadInt64(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs index aa89e08f..2113add9 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Empty.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/empty.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/empty.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -50,6 +52,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Empty : pb::IMessage<Empty> { private static readonly pb::MessageParser<Empty> _parser = new pb::MessageParser<Empty>(() => new Empty()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Empty> Parser { get { return _parser; } } @@ -72,6 +75,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Empty(Empty other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -92,12 +96,15 @@ namespace Google.Protobuf.WellKnownTypes { if (ReferenceEquals(other, this)) { return true; } - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -108,11 +115,17 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -121,6 +134,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other == null) { return; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -129,7 +143,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; } } diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs index ee4561ff..3565f433 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/FieldMask.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/field_mask.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/field_mask.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -248,6 +250,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class FieldMask : pb::IMessage<FieldMask> { private static readonly pb::MessageParser<FieldMask> _parser = new pb::MessageParser<FieldMask>(() => new FieldMask()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<FieldMask> Parser { get { return _parser; } } @@ -271,6 +274,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public FieldMask(FieldMask other) : this() { paths_ = other.paths_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -305,13 +309,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if(!paths_.Equals(other.paths_)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; hash ^= paths_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -323,12 +330,18 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { paths_.WriteTo(output, _repeated_paths_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; size += paths_.CalculateSize(_repeated_paths_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -338,6 +351,7 @@ namespace Google.Protobuf.WellKnownTypes { return; } paths_.Add(other.paths_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -346,7 +360,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { paths_.AddEntriesFrom(input, _repeated_paths_codec); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs index 6ddadf19..124ddaa7 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/SourceContext.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/source_context.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/source_context.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -44,6 +46,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class SourceContext : pb::IMessage<SourceContext> { private static readonly pb::MessageParser<SourceContext> _parser = new pb::MessageParser<SourceContext>(() => new SourceContext()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<SourceContext> Parser { get { return _parser; } } @@ -67,6 +70,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public SourceContext(SourceContext other) : this() { fileName_ = other.fileName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -103,13 +107,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (FileName != other.FileName) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (FileName.Length != 0) hash ^= FileName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -124,6 +131,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(10); output.WriteString(FileName); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -132,6 +142,9 @@ namespace Google.Protobuf.WellKnownTypes { if (FileName.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -143,6 +156,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.FileName.Length != 0) { FileName = other.FileName; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -151,7 +165,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { FileName = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs index 65119894..194b81e9 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/struct.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/struct.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -77,6 +79,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Struct : pb::IMessage<Struct> { private static readonly pb::MessageParser<Struct> _parser = new pb::MessageParser<Struct>(() => new Struct()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Struct> Parser { get { return _parser; } } @@ -100,6 +103,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Struct(Struct other) : this() { fields_ = other.fields_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -134,13 +138,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (!Fields.Equals(other.Fields)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; hash ^= Fields.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -152,12 +159,18 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { fields_.WriteTo(output, _map_fields_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; size += fields_.CalculateSize(_map_fields_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -167,6 +180,7 @@ namespace Google.Protobuf.WellKnownTypes { return; } fields_.Add(other.fields_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -175,7 +189,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { fields_.AddEntriesFrom(input, _map_fields_codec); @@ -197,6 +211,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Value : pb::IMessage<Value> { private static readonly pb::MessageParser<Value> _parser = new pb::MessageParser<Value>(() => new Value()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Value> Parser { get { return _parser; } } @@ -240,6 +255,7 @@ namespace Google.Protobuf.WellKnownTypes { break; } + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -368,25 +384,28 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (NullValue != other.NullValue) return false; - if (NumberValue != other.NumberValue) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NumberValue, other.NumberValue)) return false; if (StringValue != other.StringValue) return false; if (BoolValue != other.BoolValue) return false; if (!object.Equals(StructValue, other.StructValue)) return false; if (!object.Equals(ListValue, other.ListValue)) return false; if (KindCase != other.KindCase) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode(); - if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode(); + if (kindCase_ == KindOneofCase.NumberValue) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NumberValue); if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode(); if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode(); if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode(); if (kindCase_ == KindOneofCase.ListValue) hash ^= ListValue.GetHashCode(); hash ^= (int) kindCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -421,6 +440,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(50); output.WriteMessage(ListValue); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -444,6 +466,9 @@ namespace Google.Protobuf.WellKnownTypes { if (kindCase_ == KindOneofCase.ListValue) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(ListValue); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -479,6 +504,7 @@ namespace Google.Protobuf.WellKnownTypes { break; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -487,7 +513,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { kind_ = input.ReadEnum(); @@ -537,6 +563,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class ListValue : pb::IMessage<ListValue> { private static readonly pb::MessageParser<ListValue> _parser = new pb::MessageParser<ListValue>(() => new ListValue()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<ListValue> Parser { get { return _parser; } } @@ -560,6 +587,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public ListValue(ListValue other) : this() { values_ = other.values_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -594,13 +622,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if(!values_.Equals(other.values_)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; hash ^= values_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -612,12 +643,18 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public void WriteTo(pb::CodedOutputStream output) { values_.WriteTo(output, _repeated_values_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public int CalculateSize() { int size = 0; size += values_.CalculateSize(_repeated_values_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -627,6 +664,7 @@ namespace Google.Protobuf.WellKnownTypes { return; } values_.Add(other.values_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -635,7 +673,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { values_.AddEntriesFrom(input, _repeated_values_codec); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs index 9f7ad73a..bf2943df 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/timestamp.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/timestamp.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -117,6 +119,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Timestamp : pb::IMessage<Timestamp> { private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Timestamp> Parser { get { return _parser; } } @@ -141,6 +144,7 @@ namespace Google.Protobuf.WellKnownTypes { public Timestamp(Timestamp other) : this() { seconds_ = other.seconds_; nanos_ = other.nanos_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -196,7 +200,7 @@ namespace Google.Protobuf.WellKnownTypes { } if (Seconds != other.Seconds) return false; if (Nanos != other.Nanos) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -204,6 +208,9 @@ namespace Google.Protobuf.WellKnownTypes { int hash = 1; if (Seconds != 0L) hash ^= Seconds.GetHashCode(); if (Nanos != 0) hash ^= Nanos.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -222,6 +229,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(16); output.WriteInt32(Nanos); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -233,6 +243,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Nanos != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -247,6 +260,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Nanos != 0) { Nanos = other.Nanos; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -255,7 +269,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Seconds = input.ReadInt64(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs index 7375b6cb..84310550 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Type.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/type.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/type.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -94,6 +96,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Type : pb::IMessage<Type> { private static readonly pb::MessageParser<Type> _parser = new pb::MessageParser<Type>(() => new Type()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Type> Parser { get { return _parser; } } @@ -122,6 +125,7 @@ namespace Google.Protobuf.WellKnownTypes { options_ = other.options_.Clone(); SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null; syntax_ = other.syntax_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -229,7 +233,7 @@ namespace Google.Protobuf.WellKnownTypes { if(!options_.Equals(other.options_)) return false; if (!object.Equals(SourceContext, other.SourceContext)) return false; if (Syntax != other.Syntax) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -241,6 +245,9 @@ namespace Google.Protobuf.WellKnownTypes { hash ^= options_.GetHashCode(); if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); if (Syntax != 0) hash ^= Syntax.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -266,6 +273,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(48); output.WriteEnum((int) Syntax); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -283,6 +293,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Syntax != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -306,6 +319,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Syntax != 0) { Syntax = other.Syntax; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -314,7 +328,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); @@ -354,6 +368,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Field : pb::IMessage<Field> { private static readonly pb::MessageParser<Field> _parser = new pb::MessageParser<Field>(() => new Field()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Field> Parser { get { return _parser; } } @@ -386,6 +401,7 @@ namespace Google.Protobuf.WellKnownTypes { options_ = other.options_.Clone(); jsonName_ = other.jsonName_; defaultValue_ = other.defaultValue_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -557,7 +573,7 @@ namespace Google.Protobuf.WellKnownTypes { if(!options_.Equals(other.options_)) return false; if (JsonName != other.JsonName) return false; if (DefaultValue != other.DefaultValue) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -573,6 +589,9 @@ namespace Google.Protobuf.WellKnownTypes { hash ^= options_.GetHashCode(); if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -620,6 +639,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(90); output.WriteString(DefaultValue); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -653,6 +675,9 @@ namespace Google.Protobuf.WellKnownTypes { if (DefaultValue.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -689,6 +714,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.DefaultValue.Length != 0) { DefaultValue = other.DefaultValue; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -697,7 +723,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { kind_ = (global::Google.Protobuf.WellKnownTypes.Field.Types.Kind) input.ReadEnum(); @@ -861,6 +887,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Enum : pb::IMessage<Enum> { private static readonly pb::MessageParser<Enum> _parser = new pb::MessageParser<Enum>(() => new Enum()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Enum> Parser { get { return _parser; } } @@ -888,6 +915,7 @@ namespace Google.Protobuf.WellKnownTypes { options_ = other.options_.Clone(); SourceContext = other.sourceContext_ != null ? other.SourceContext.Clone() : null; syntax_ = other.syntax_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -981,7 +1009,7 @@ namespace Google.Protobuf.WellKnownTypes { if(!options_.Equals(other.options_)) return false; if (!object.Equals(SourceContext, other.SourceContext)) return false; if (Syntax != other.Syntax) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -992,6 +1020,9 @@ namespace Google.Protobuf.WellKnownTypes { hash ^= options_.GetHashCode(); if (sourceContext_ != null) hash ^= SourceContext.GetHashCode(); if (Syntax != 0) hash ^= Syntax.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1016,6 +1047,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(40); output.WriteEnum((int) Syntax); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1032,6 +1066,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Syntax != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Syntax); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1054,6 +1091,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Syntax != 0) { Syntax = other.Syntax; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1062,7 +1100,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); @@ -1098,6 +1136,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class EnumValue : pb::IMessage<EnumValue> { private static readonly pb::MessageParser<EnumValue> _parser = new pb::MessageParser<EnumValue>(() => new EnumValue()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<EnumValue> Parser { get { return _parser; } } @@ -1123,6 +1162,7 @@ namespace Google.Protobuf.WellKnownTypes { name_ = other.name_; number_ = other.number_; options_ = other.options_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1187,7 +1227,7 @@ namespace Google.Protobuf.WellKnownTypes { if (Name != other.Name) return false; if (Number != other.Number) return false; if(!options_.Equals(other.options_)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1196,6 +1236,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Name.Length != 0) hash ^= Name.GetHashCode(); if (Number != 0) hash ^= Number.GetHashCode(); hash ^= options_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1215,6 +1258,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteInt32(Number); } options_.WriteTo(output, _repeated_options_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1227,6 +1273,9 @@ namespace Google.Protobuf.WellKnownTypes { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); } size += options_.CalculateSize(_repeated_options_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1242,6 +1291,7 @@ namespace Google.Protobuf.WellKnownTypes { Number = other.Number; } options_.Add(other.options_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1250,7 +1300,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); @@ -1276,6 +1326,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Option : pb::IMessage<Option> { private static readonly pb::MessageParser<Option> _parser = new pb::MessageParser<Option>(() => new Option()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Option> Parser { get { return _parser; } } @@ -1300,6 +1351,7 @@ namespace Google.Protobuf.WellKnownTypes { public Option(Option other) : this() { name_ = other.name_; Value = other.value_ != null ? other.Value.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1356,7 +1408,7 @@ namespace Google.Protobuf.WellKnownTypes { } if (Name != other.Name) return false; if (!object.Equals(Value, other.Value)) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1364,6 +1416,9 @@ namespace Google.Protobuf.WellKnownTypes { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); if (value_ != null) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1382,6 +1437,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(18); output.WriteMessage(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1393,6 +1451,9 @@ namespace Google.Protobuf.WellKnownTypes { if (value_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1410,6 +1471,7 @@ namespace Google.Protobuf.WellKnownTypes { } Value.MergeFrom(other.Value); } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1418,7 +1480,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs index 9a5fb81e..25a65aa7 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs @@ -1,5 +1,7 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/protobuf/wrappers.proto +// <auto-generated> +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/protobuf/wrappers.proto +// </auto-generated> #pragma warning disable 1591, 0612, 3021 #region Designer generated code @@ -57,6 +59,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class DoubleValue : pb::IMessage<DoubleValue> { private static readonly pb::MessageParser<DoubleValue> _parser = new pb::MessageParser<DoubleValue>(() => new DoubleValue()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<DoubleValue> Parser { get { return _parser; } } @@ -80,6 +83,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public DoubleValue(DoubleValue other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -114,14 +118,17 @@ namespace Google.Protobuf.WellKnownTypes { if (ReferenceEquals(other, this)) { return true; } - if (Value != other.Value) return false; - return true; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Value, other.Value)) return false; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Value != 0D) hash ^= Value.GetHashCode(); + if (Value != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Value); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -136,6 +143,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(9); output.WriteDouble(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -144,6 +154,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value != 0D) { size += 1 + 8; } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -155,6 +168,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value != 0D) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -163,7 +177,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 9: { Value = input.ReadDouble(); @@ -182,6 +196,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class FloatValue : pb::IMessage<FloatValue> { private static readonly pb::MessageParser<FloatValue> _parser = new pb::MessageParser<FloatValue>(() => new FloatValue()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<FloatValue> Parser { get { return _parser; } } @@ -205,6 +220,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public FloatValue(FloatValue other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -239,14 +255,17 @@ namespace Google.Protobuf.WellKnownTypes { if (ReferenceEquals(other, this)) { return true; } - if (Value != other.Value) return false; - return true; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Value, other.Value)) return false; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Value != 0F) hash ^= Value.GetHashCode(); + if (Value != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Value); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -261,6 +280,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(13); output.WriteFloat(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -269,6 +291,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value != 0F) { size += 1 + 4; } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -280,6 +305,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value != 0F) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -288,7 +314,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 13: { Value = input.ReadFloat(); @@ -307,6 +333,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Int64Value : pb::IMessage<Int64Value> { private static readonly pb::MessageParser<Int64Value> _parser = new pb::MessageParser<Int64Value>(() => new Int64Value()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Int64Value> Parser { get { return _parser; } } @@ -330,6 +357,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Int64Value(Int64Value other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -365,13 +393,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Value != 0L) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -386,6 +417,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(8); output.WriteInt64(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -394,6 +428,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -405,6 +442,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value != 0L) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -413,7 +451,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Value = input.ReadInt64(); @@ -432,6 +470,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class UInt64Value : pb::IMessage<UInt64Value> { private static readonly pb::MessageParser<UInt64Value> _parser = new pb::MessageParser<UInt64Value>(() => new UInt64Value()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<UInt64Value> Parser { get { return _parser; } } @@ -455,6 +494,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public UInt64Value(UInt64Value other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -490,13 +530,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Value != 0UL) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -511,6 +554,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(8); output.WriteUInt64(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -519,6 +565,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value != 0UL) { size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -530,6 +579,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value != 0UL) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -538,7 +588,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Value = input.ReadUInt64(); @@ -557,6 +607,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class Int32Value : pb::IMessage<Int32Value> { private static readonly pb::MessageParser<Int32Value> _parser = new pb::MessageParser<Int32Value>(() => new Int32Value()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<Int32Value> Parser { get { return _parser; } } @@ -580,6 +631,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public Int32Value(Int32Value other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -615,13 +667,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Value != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -636,6 +691,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(8); output.WriteInt32(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -644,6 +702,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -655,6 +716,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value != 0) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -663,7 +725,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Value = input.ReadInt32(); @@ -682,6 +744,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class UInt32Value : pb::IMessage<UInt32Value> { private static readonly pb::MessageParser<UInt32Value> _parser = new pb::MessageParser<UInt32Value>(() => new UInt32Value()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<UInt32Value> Parser { get { return _parser; } } @@ -705,6 +768,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public UInt32Value(UInt32Value other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -740,13 +804,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Value != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -761,6 +828,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(8); output.WriteUInt32(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -769,6 +839,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value != 0) { size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -780,6 +853,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value != 0) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -788,7 +862,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Value = input.ReadUInt32(); @@ -807,6 +881,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class BoolValue : pb::IMessage<BoolValue> { private static readonly pb::MessageParser<BoolValue> _parser = new pb::MessageParser<BoolValue>(() => new BoolValue()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<BoolValue> Parser { get { return _parser; } } @@ -830,6 +905,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public BoolValue(BoolValue other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -865,13 +941,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Value != false) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -886,6 +965,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(8); output.WriteBool(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -894,6 +976,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value != false) { size += 1 + 1; } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -905,6 +990,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value != false) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -913,7 +999,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { Value = input.ReadBool(); @@ -932,6 +1018,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class StringValue : pb::IMessage<StringValue> { private static readonly pb::MessageParser<StringValue> _parser = new pb::MessageParser<StringValue>(() => new StringValue()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<StringValue> Parser { get { return _parser; } } @@ -955,6 +1042,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public StringValue(StringValue other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -990,13 +1078,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1011,6 +1102,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(10); output.WriteString(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1019,6 +1113,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1030,6 +1127,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value.Length != 0) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1038,7 +1136,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Value = input.ReadString(); @@ -1057,6 +1155,7 @@ namespace Google.Protobuf.WellKnownTypes { /// </summary> public sealed partial class BytesValue : pb::IMessage<BytesValue> { private static readonly pb::MessageParser<BytesValue> _parser = new pb::MessageParser<BytesValue>(() => new BytesValue()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pb::MessageParser<BytesValue> Parser { get { return _parser; } } @@ -1080,6 +1179,7 @@ namespace Google.Protobuf.WellKnownTypes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public BytesValue(BytesValue other) : this() { value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1115,13 +1215,16 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (Value != other.Value) return false; - return true; + return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } return hash; } @@ -1136,6 +1239,9 @@ namespace Google.Protobuf.WellKnownTypes { output.WriteRawTag(10); output.WriteBytes(Value); } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1144,6 +1250,9 @@ namespace Google.Protobuf.WellKnownTypes { if (Value.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeBytesSize(Value); } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } return size; } @@ -1155,6 +1264,7 @@ namespace Google.Protobuf.WellKnownTypes { if (other.Value.Length != 0) { Value = other.Value; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1163,7 +1273,7 @@ namespace Google.Protobuf.WellKnownTypes { while ((tag = input.ReadTag()) != 0) { switch(tag) { default: - input.SkipLastField(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Value = input.ReadBytes(); |