| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: unittest_issues.proto |
| #pragma warning disable 1591, 0612, 3021 |
| #region Designer generated code |
| |
| using pb = global::Google.Protobuf; |
| using pbc = global::Google.Protobuf.Collections; |
| using pbd = global::Google.Protobuf.Descriptors; |
| using scg = global::System.Collections.Generic; |
| namespace UnitTest.Issues.TestProtos { |
| |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| public static partial class UnittestIssues { |
| |
| #region Static variables |
| internal static pbd::MessageDescriptor internal__static_unittest_issues_NegativeEnumMessage__Descriptor; |
| internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.NegativeEnumMessage> internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable; |
| internal static pbd::MessageDescriptor internal__static_unittest_issues_DeprecatedChild__Descriptor; |
| internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedChild> internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable; |
| internal static pbd::MessageDescriptor internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor; |
| internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage> internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable; |
| internal static pbd::MessageDescriptor internal__static_unittest_issues_ItemField__Descriptor; |
| internal static pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.ItemField> internal__static_unittest_issues_ItemField__FieldAccessorTable; |
| #endregion |
| #region Descriptor |
| public static pbd::FileDescriptor Descriptor { |
| get { return descriptor; } |
| } |
| private static pbd::FileDescriptor descriptor; |
| |
| static UnittestIssues() { |
| byte[] descriptorData = global::System.Convert.FromBase64String( |
| string.Concat( |
| "ChV1bml0dGVzdF9pc3N1ZXMucHJvdG8SD3VuaXR0ZXN0X2lzc3VlcyKwAQoT", |
| "TmVnYXRpdmVFbnVtTWVzc2FnZRIsCgV2YWx1ZRgBIAEoDjIdLnVuaXR0ZXN0", |
| "X2lzc3Vlcy5OZWdhdGl2ZUVudW0SMQoGdmFsdWVzGAIgAygOMh0udW5pdHRl", |
| "c3RfaXNzdWVzLk5lZ2F0aXZlRW51bUICEAASOAoNcGFja2VkX3ZhbHVlcxgD", |
| "IAMoDjIdLnVuaXR0ZXN0X2lzc3Vlcy5OZWdhdGl2ZUVudW1CAhABIhEKD0Rl", |
| "cHJlY2F0ZWRDaGlsZCK5AgoXRGVwcmVjYXRlZEZpZWxkc01lc3NhZ2USGgoO", |
| "UHJpbWl0aXZlVmFsdWUYASABKAVCAhgBEhoKDlByaW1pdGl2ZUFycmF5GAIg", |
| "AygFQgIYARI6CgxNZXNzYWdlVmFsdWUYAyABKAsyIC51bml0dGVzdF9pc3N1", |
| "ZXMuRGVwcmVjYXRlZENoaWxkQgIYARI6CgxNZXNzYWdlQXJyYXkYBCADKAsy", |
| "IC51bml0dGVzdF9pc3N1ZXMuRGVwcmVjYXRlZENoaWxkQgIYARI2CglFbnVt", |
| "VmFsdWUYBSABKA4yHy51bml0dGVzdF9pc3N1ZXMuRGVwcmVjYXRlZEVudW1C", |
| "AhgBEjYKCUVudW1BcnJheRgGIAMoDjIfLnVuaXR0ZXN0X2lzc3Vlcy5EZXBy", |
| "ZWNhdGVkRW51bUICGAEiGQoJSXRlbUZpZWxkEgwKBGl0ZW0YASABKAUqVQoM", |
| "TmVnYXRpdmVFbnVtEhYKEk5FR0FUSVZFX0VOVU1fWkVSTxAAEhYKCUZpdmVC", |
| "ZWxvdxD7//////////8BEhUKCE1pbnVzT25lEP///////////wEqLgoORGVw", |
| "cmVjYXRlZEVudW0SEwoPREVQUkVDQVRFRF9aRVJPEAASBwoDb25lEAFCH0gB", |
| "qgIaVW5pdFRlc3QuSXNzdWVzLlRlc3RQcm90b3NiBnByb3RvMw==")); |
| pbd::FileDescriptor.InternalDescriptorAssigner assigner = delegate(pbd::FileDescriptor root) { |
| descriptor = root; |
| internal__static_unittest_issues_NegativeEnumMessage__Descriptor = Descriptor.MessageTypes[0]; |
| internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable = |
| new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.NegativeEnumMessage>(internal__static_unittest_issues_NegativeEnumMessage__Descriptor, |
| new string[] { "Value", "Values", "PackedValues", }); |
| internal__static_unittest_issues_DeprecatedChild__Descriptor = Descriptor.MessageTypes[1]; |
| internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable = |
| new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedChild>(internal__static_unittest_issues_DeprecatedChild__Descriptor, |
| new string[] { }); |
| internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor = Descriptor.MessageTypes[2]; |
| internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable = |
| new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.DeprecatedFieldsMessage>(internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor, |
| new string[] { "PrimitiveValue", "PrimitiveArray", "MessageValue", "MessageArray", "EnumValue", "EnumArray", }); |
| internal__static_unittest_issues_ItemField__Descriptor = Descriptor.MessageTypes[3]; |
| internal__static_unittest_issues_ItemField__FieldAccessorTable = |
| new pb::FieldAccess.FieldAccessorTable<global::UnitTest.Issues.TestProtos.ItemField>(internal__static_unittest_issues_ItemField__Descriptor, |
| new string[] { "Item", }); |
| }; |
| pbd::FileDescriptor.InternalBuildGeneratedFileFrom(descriptorData, |
| new pbd::FileDescriptor[] { |
| }, assigner); |
| } |
| #endregion |
| |
| } |
| #region Enums |
| public enum NegativeEnum { |
| NEGATIVE_ENUM_ZERO = 0, |
| FiveBelow = -5, |
| MinusOne = -1, |
| } |
| |
| public enum DeprecatedEnum { |
| DEPRECATED_ZERO = 0, |
| one = 1, |
| } |
| |
| #endregion |
| |
| #region Messages |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| public sealed partial class NegativeEnumMessage : pb::IMessage<NegativeEnumMessage> { |
| private static readonly pb::MessageParser<NegativeEnumMessage> _parser = new pb::MessageParser<NegativeEnumMessage>(() => new NegativeEnumMessage()); |
| public static pb::MessageParser<NegativeEnumMessage> Parser { get { return _parser; } } |
| |
| private static readonly string[] _fieldNames = new string[] { "packed_values", "value", "values" }; |
| private static readonly uint[] _fieldTags = new uint[] { 26, 8, 16 }; |
| public static pbd::MessageDescriptor Descriptor { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_NegativeEnumMessage__Descriptor; } |
| } |
| |
| public pb::FieldAccess.FieldAccessorTable<NegativeEnumMessage> Fields { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_NegativeEnumMessage__FieldAccessorTable; } |
| } |
| |
| private bool _frozen = false; |
| public bool IsFrozen { get { return _frozen; } } |
| |
| public NegativeEnumMessage() { } |
| |
| public NegativeEnumMessage(NegativeEnumMessage other) { |
| value_ = other.value_; |
| values_ = other.values_.Clone(); |
| packedValues_ = other.packedValues_.Clone(); |
| } |
| |
| public NegativeEnumMessage Clone() { |
| return new NegativeEnumMessage(this); |
| } |
| |
| public void Freeze() { |
| if (IsFrozen) { |
| return; |
| } |
| _frozen = true; |
| values_.Freeze(); |
| packedValues_.Freeze(); |
| } |
| |
| public const int ValueFieldNumber = 1; |
| private global::UnitTest.Issues.TestProtos.NegativeEnum value_ = global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO; |
| public global::UnitTest.Issues.TestProtos.NegativeEnum Value { |
| get { return value_; } |
| set { |
| pb::Freezable.CheckMutable(this); |
| value_ = value; |
| } |
| } |
| |
| public const int ValuesFieldNumber = 2; |
| private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> values_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>(); |
| public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> Values { |
| get { return values_; } |
| } |
| |
| public const int PackedValuesFieldNumber = 3; |
| private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> packedValues_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum>(); |
| public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.NegativeEnum> PackedValues { |
| get { return packedValues_; } |
| } |
| |
| public override bool Equals(object other) { |
| return Equals(other as NegativeEnumMessage); |
| } |
| |
| public bool Equals(NegativeEnumMessage other) { |
| if (ReferenceEquals(other, null)) { |
| return false; |
| } |
| if (ReferenceEquals(other, this)) { |
| return true; |
| } |
| if (Value != other.Value) return false; |
| if(!values_.Equals(other.values_)) return false; |
| if(!packedValues_.Equals(other.packedValues_)) return false; |
| return true; |
| } |
| |
| public override int GetHashCode() { |
| int hash = 17; |
| if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) hash ^= Value.GetHashCode(); |
| hash ^= values_.GetHashCode(); |
| hash ^= packedValues_.GetHashCode(); |
| return hash; |
| } |
| |
| public void WriteTo(pb::CodedOutputStream output) { |
| if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) { |
| output.WriteRawTag(8); |
| output.WriteEnum((int) Value); |
| } |
| if (values_.Count > 0) { |
| output.WriteEnumArray(2, values_); |
| } |
| if (packedValues_.Count > 0) { |
| output.WriteRawTag(26); |
| output.WritePackedEnumArray(packedValues_); |
| } |
| } |
| |
| public int CalculateSize() { |
| int size = 0; |
| if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) { |
| size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Value); |
| } |
| if (values_.Count > 0) { |
| int dataSize = 0; |
| foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in values_) { |
| dataSize += pb::CodedOutputStream.ComputeEnumSize((int) element); |
| } |
| size += dataSize; |
| size += 1 * values_.Count; |
| } |
| if (packedValues_.Count > 0) { |
| int dataSize = 0; |
| foreach (global::UnitTest.Issues.TestProtos.NegativeEnum element in packedValues_) { |
| dataSize += pb::CodedOutputStream.ComputeEnumSize((int) element); |
| } |
| size += dataSize; |
| size += 1 + pb::CodedOutputStream.ComputeRawVarint32Size((uint) dataSize); |
| } |
| return size; |
| } |
| |
| public void MergeFrom(NegativeEnumMessage other) { |
| if (other == null) { |
| return; |
| } |
| if (other.Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) { |
| Value = other.Value; |
| } |
| values_.Add(other.values_); |
| packedValues_.Add(other.packedValues_); |
| } |
| |
| public void MergeFrom(pb::CodedInputStream input) { |
| uint tag; |
| while (input.ReadTag(out tag)) { |
| switch(tag) { |
| case 0: |
| throw pb::InvalidProtocolBufferException.InvalidTag(); |
| default: |
| if (pb::WireFormat.IsEndGroupTag(tag)) { |
| return; |
| } |
| break; |
| case 8: { |
| value_ = (global::UnitTest.Issues.TestProtos.NegativeEnum) input.ReadEnum(); |
| break; |
| } |
| case 18: |
| case 16: { |
| input.ReadEnumArray<global::UnitTest.Issues.TestProtos.NegativeEnum>(values_); |
| break; |
| } |
| case 26: |
| case 24: { |
| input.ReadEnumArray<global::UnitTest.Issues.TestProtos.NegativeEnum>(packedValues_); |
| break; |
| } |
| } |
| } |
| } |
| |
| } |
| |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| public sealed partial class DeprecatedChild : pb::IMessage<DeprecatedChild> { |
| private static readonly pb::MessageParser<DeprecatedChild> _parser = new pb::MessageParser<DeprecatedChild>(() => new DeprecatedChild()); |
| public static pb::MessageParser<DeprecatedChild> Parser { get { return _parser; } } |
| |
| private static readonly string[] _fieldNames = new string[] { }; |
| private static readonly uint[] _fieldTags = new uint[] { }; |
| public static pbd::MessageDescriptor Descriptor { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedChild__Descriptor; } |
| } |
| |
| public pb::FieldAccess.FieldAccessorTable<DeprecatedChild> Fields { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedChild__FieldAccessorTable; } |
| } |
| |
| private bool _frozen = false; |
| public bool IsFrozen { get { return _frozen; } } |
| |
| public DeprecatedChild() { } |
| |
| public DeprecatedChild(DeprecatedChild other) { |
| } |
| |
| public DeprecatedChild Clone() { |
| return new DeprecatedChild(this); |
| } |
| |
| public void Freeze() { |
| if (IsFrozen) { |
| return; |
| } |
| _frozen = true; |
| } |
| |
| public override bool Equals(object other) { |
| return Equals(other as DeprecatedChild); |
| } |
| |
| public bool Equals(DeprecatedChild other) { |
| if (ReferenceEquals(other, null)) { |
| return false; |
| } |
| if (ReferenceEquals(other, this)) { |
| return true; |
| } |
| return true; |
| } |
| |
| public override int GetHashCode() { |
| int hash = 17; |
| return hash; |
| } |
| |
| public void WriteTo(pb::CodedOutputStream output) { |
| } |
| |
| public int CalculateSize() { |
| int size = 0; |
| return size; |
| } |
| |
| public void MergeFrom(DeprecatedChild other) { |
| if (other == null) { |
| return; |
| } |
| } |
| |
| public void MergeFrom(pb::CodedInputStream input) { |
| uint tag; |
| while (input.ReadTag(out tag)) { |
| switch(tag) { |
| case 0: |
| throw pb::InvalidProtocolBufferException.InvalidTag(); |
| default: |
| if (pb::WireFormat.IsEndGroupTag(tag)) { |
| return; |
| } |
| break; |
| } |
| } |
| } |
| |
| } |
| |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| public sealed partial class DeprecatedFieldsMessage : pb::IMessage<DeprecatedFieldsMessage> { |
| private static readonly pb::MessageParser<DeprecatedFieldsMessage> _parser = new pb::MessageParser<DeprecatedFieldsMessage>(() => new DeprecatedFieldsMessage()); |
| public static pb::MessageParser<DeprecatedFieldsMessage> Parser { get { return _parser; } } |
| |
| private static readonly string[] _fieldNames = new string[] { "EnumArray", "EnumValue", "MessageArray", "MessageValue", "PrimitiveArray", "PrimitiveValue" }; |
| private static readonly uint[] _fieldTags = new uint[] { 50, 40, 34, 26, 18, 8 }; |
| public static pbd::MessageDescriptor Descriptor { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedFieldsMessage__Descriptor; } |
| } |
| |
| public pb::FieldAccess.FieldAccessorTable<DeprecatedFieldsMessage> Fields { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_DeprecatedFieldsMessage__FieldAccessorTable; } |
| } |
| |
| private bool _frozen = false; |
| public bool IsFrozen { get { return _frozen; } } |
| |
| public DeprecatedFieldsMessage() { } |
| |
| public DeprecatedFieldsMessage(DeprecatedFieldsMessage other) { |
| primitiveValue_ = other.primitiveValue_; |
| primitiveArray_ = other.primitiveArray_.Clone(); |
| MessageValue = other.messageValue_ != null ? other.MessageValue.Clone() : null; |
| messageArray_ = other.messageArray_.Clone(); |
| enumValue_ = other.enumValue_; |
| enumArray_ = other.enumArray_.Clone(); |
| } |
| |
| public DeprecatedFieldsMessage Clone() { |
| return new DeprecatedFieldsMessage(this); |
| } |
| |
| public void Freeze() { |
| if (IsFrozen) { |
| return; |
| } |
| _frozen = true; |
| primitiveArray_.Freeze(); |
| if (messageValue_ != null) MessageValue.Freeze(); |
| messageArray_.Freeze(); |
| enumArray_.Freeze(); |
| } |
| |
| public const int PrimitiveValueFieldNumber = 1; |
| private int primitiveValue_; |
| [global::System.ObsoleteAttribute()] |
| public int PrimitiveValue { |
| get { return primitiveValue_; } |
| set { |
| pb::Freezable.CheckMutable(this); |
| primitiveValue_ = value; |
| } |
| } |
| |
| public const int PrimitiveArrayFieldNumber = 2; |
| private readonly pbc::RepeatedField<int> primitiveArray_ = new pbc::RepeatedField<int>(); |
| [global::System.ObsoleteAttribute()] |
| public pbc::RepeatedField<int> PrimitiveArray { |
| get { return primitiveArray_; } |
| } |
| |
| public const int MessageValueFieldNumber = 3; |
| private global::UnitTest.Issues.TestProtos.DeprecatedChild messageValue_; |
| [global::System.ObsoleteAttribute()] |
| public global::UnitTest.Issues.TestProtos.DeprecatedChild MessageValue { |
| get { return messageValue_; } |
| set { |
| pb::Freezable.CheckMutable(this); |
| messageValue_ = value; |
| } |
| } |
| |
| public const int MessageArrayFieldNumber = 4; |
| private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> messageArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild>(); |
| [global::System.ObsoleteAttribute()] |
| public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedChild> MessageArray { |
| get { return messageArray_; } |
| } |
| |
| public const int EnumValueFieldNumber = 5; |
| private global::UnitTest.Issues.TestProtos.DeprecatedEnum enumValue_ = global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO; |
| [global::System.ObsoleteAttribute()] |
| public global::UnitTest.Issues.TestProtos.DeprecatedEnum EnumValue { |
| get { return enumValue_; } |
| set { |
| pb::Freezable.CheckMutable(this); |
| enumValue_ = value; |
| } |
| } |
| |
| public const int EnumArrayFieldNumber = 6; |
| private readonly pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> enumArray_ = new pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum>(); |
| [global::System.ObsoleteAttribute()] |
| public pbc::RepeatedField<global::UnitTest.Issues.TestProtos.DeprecatedEnum> EnumArray { |
| get { return enumArray_; } |
| } |
| |
| public override bool Equals(object other) { |
| return Equals(other as DeprecatedFieldsMessage); |
| } |
| |
| public bool Equals(DeprecatedFieldsMessage other) { |
| if (ReferenceEquals(other, null)) { |
| return false; |
| } |
| if (ReferenceEquals(other, this)) { |
| return true; |
| } |
| if (PrimitiveValue != other.PrimitiveValue) return false; |
| if(!primitiveArray_.Equals(other.primitiveArray_)) return false; |
| if (!object.Equals(MessageValue, other.MessageValue)) return false; |
| if(!messageArray_.Equals(other.messageArray_)) return false; |
| if (EnumValue != other.EnumValue) return false; |
| if(!enumArray_.Equals(other.enumArray_)) return false; |
| return true; |
| } |
| |
| public override int GetHashCode() { |
| int hash = 17; |
| if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode(); |
| hash ^= primitiveArray_.GetHashCode(); |
| if (messageValue_ != null) hash ^= MessageValue.GetHashCode(); |
| hash ^= messageArray_.GetHashCode(); |
| if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) hash ^= EnumValue.GetHashCode(); |
| hash ^= enumArray_.GetHashCode(); |
| return hash; |
| } |
| |
| public void WriteTo(pb::CodedOutputStream output) { |
| if (PrimitiveValue != 0) { |
| output.WriteRawTag(8); |
| output.WriteInt32(PrimitiveValue); |
| } |
| if (primitiveArray_.Count > 0) { |
| output.WriteRawTag(18); |
| output.WritePackedInt32Array(primitiveArray_); |
| } |
| if (messageValue_ != null) { |
| output.WriteRawTag(26); |
| output.WriteMessage(MessageValue); |
| } |
| if (messageArray_.Count > 0) { |
| output.WriteMessageArray(4, messageArray_); |
| } |
| if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) { |
| output.WriteRawTag(40); |
| output.WriteEnum((int) EnumValue); |
| } |
| if (enumArray_.Count > 0) { |
| output.WriteRawTag(50); |
| output.WritePackedEnumArray(enumArray_); |
| } |
| } |
| |
| public int CalculateSize() { |
| int size = 0; |
| if (PrimitiveValue != 0) { |
| size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveValue); |
| } |
| if (primitiveArray_.Count > 0) { |
| int dataSize = 0; |
| foreach (int element in primitiveArray_) { |
| dataSize += pb::CodedOutputStream.ComputeInt32Size(element); |
| } |
| size += dataSize; |
| size += 1 + pb::CodedOutputStream.ComputeInt32Size(dataSize); |
| } |
| if (messageValue_ != null) { |
| size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageValue); |
| } |
| if (messageArray_.Count > 0) { |
| foreach (global::UnitTest.Issues.TestProtos.DeprecatedChild element in messageArray_) { |
| size += pb::CodedOutputStream.ComputeMessageSize(element); |
| } |
| size += 1 * messageArray_.Count; |
| } |
| if (EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) { |
| size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumValue); |
| } |
| if (enumArray_.Count > 0) { |
| int dataSize = 0; |
| foreach (global::UnitTest.Issues.TestProtos.DeprecatedEnum element in enumArray_) { |
| dataSize += pb::CodedOutputStream.ComputeEnumSize((int) element); |
| } |
| size += dataSize; |
| size += 1 + pb::CodedOutputStream.ComputeRawVarint32Size((uint) dataSize); |
| } |
| return size; |
| } |
| |
| public void MergeFrom(DeprecatedFieldsMessage other) { |
| if (other == null) { |
| return; |
| } |
| if (other.PrimitiveValue != 0) { |
| PrimitiveValue = other.PrimitiveValue; |
| } |
| primitiveArray_.Add(other.primitiveArray_); |
| if (other.messageValue_ != null) { |
| if (messageValue_ == null) { |
| messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild(); |
| } |
| MessageValue.MergeFrom(other.MessageValue); |
| } |
| messageArray_.Add(other.messageArray_); |
| if (other.EnumValue != global::UnitTest.Issues.TestProtos.DeprecatedEnum.DEPRECATED_ZERO) { |
| EnumValue = other.EnumValue; |
| } |
| enumArray_.Add(other.enumArray_); |
| } |
| |
| public void MergeFrom(pb::CodedInputStream input) { |
| uint tag; |
| while (input.ReadTag(out tag)) { |
| switch(tag) { |
| case 0: |
| throw pb::InvalidProtocolBufferException.InvalidTag(); |
| default: |
| if (pb::WireFormat.IsEndGroupTag(tag)) { |
| return; |
| } |
| break; |
| case 8: { |
| PrimitiveValue = input.ReadInt32(); |
| break; |
| } |
| case 18: |
| case 16: { |
| input.ReadInt32Array(primitiveArray_); |
| break; |
| } |
| case 26: { |
| if (messageValue_ == null) { |
| messageValue_ = new global::UnitTest.Issues.TestProtos.DeprecatedChild(); |
| } |
| input.ReadMessage(messageValue_); |
| break; |
| } |
| case 34: { |
| input.ReadMessageArray(messageArray_, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser); |
| break; |
| } |
| case 40: { |
| enumValue_ = (global::UnitTest.Issues.TestProtos.DeprecatedEnum) input.ReadEnum(); |
| break; |
| } |
| case 50: |
| case 48: { |
| input.ReadEnumArray<global::UnitTest.Issues.TestProtos.DeprecatedEnum>(enumArray_); |
| break; |
| } |
| } |
| } |
| } |
| |
| } |
| |
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| public sealed partial class ItemField : pb::IMessage<ItemField> { |
| private static readonly pb::MessageParser<ItemField> _parser = new pb::MessageParser<ItemField>(() => new ItemField()); |
| public static pb::MessageParser<ItemField> Parser { get { return _parser; } } |
| |
| private static readonly string[] _fieldNames = new string[] { "item" }; |
| private static readonly uint[] _fieldTags = new uint[] { 8 }; |
| public static pbd::MessageDescriptor Descriptor { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_ItemField__Descriptor; } |
| } |
| |
| public pb::FieldAccess.FieldAccessorTable<ItemField> Fields { |
| get { return global::UnitTest.Issues.TestProtos.UnittestIssues.internal__static_unittest_issues_ItemField__FieldAccessorTable; } |
| } |
| |
| private bool _frozen = false; |
| public bool IsFrozen { get { return _frozen; } } |
| |
| public ItemField() { } |
| |
| public ItemField(ItemField other) { |
| item_ = other.item_; |
| } |
| |
| public ItemField Clone() { |
| return new ItemField(this); |
| } |
| |
| public void Freeze() { |
| if (IsFrozen) { |
| return; |
| } |
| _frozen = true; |
| } |
| |
| public const int ItemFieldNumber = 1; |
| private int item_; |
| public int Item { |
| get { return item_; } |
| set { |
| pb::Freezable.CheckMutable(this); |
| item_ = value; |
| } |
| } |
| |
| public override bool Equals(object other) { |
| return Equals(other as ItemField); |
| } |
| |
| public bool Equals(ItemField other) { |
| if (ReferenceEquals(other, null)) { |
| return false; |
| } |
| if (ReferenceEquals(other, this)) { |
| return true; |
| } |
| if (Item != other.Item) return false; |
| return true; |
| } |
| |
| public override int GetHashCode() { |
| int hash = 17; |
| if (Item != 0) hash ^= Item.GetHashCode(); |
| return hash; |
| } |
| |
| public void WriteTo(pb::CodedOutputStream output) { |
| if (Item != 0) { |
| output.WriteRawTag(8); |
| output.WriteInt32(Item); |
| } |
| } |
| |
| public int CalculateSize() { |
| int size = 0; |
| if (Item != 0) { |
| size += 1 + pb::CodedOutputStream.ComputeInt32Size(Item); |
| } |
| return size; |
| } |
| |
| public void MergeFrom(ItemField other) { |
| if (other == null) { |
| return; |
| } |
| if (other.Item != 0) { |
| Item = other.Item; |
| } |
| } |
| |
| public void MergeFrom(pb::CodedInputStream input) { |
| uint tag; |
| while (input.ReadTag(out tag)) { |
| switch(tag) { |
| case 0: |
| throw pb::InvalidProtocolBufferException.InvalidTag(); |
| default: |
| if (pb::WireFormat.IsEndGroupTag(tag)) { |
| return; |
| } |
| break; |
| case 8: { |
| Item = input.ReadInt32(); |
| break; |
| } |
| } |
| } |
| } |
| |
| } |
| |
| #endregion |
| |
| } |
| |
| #endregion Designer generated code |