< Summary

Class:DCL.ECSComponents.PBPointerEventsResult
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/PointerEventsResult.gen.cs
Covered lines:19
Uncovered lines:115
Coverable lines:134
Total lines:466
Line coverage:14.1% (19 of 134)
Covered branches:0
Total branches:0
Covered methods:12
Total methods:29
Method coverage:41.3% (12 of 29)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBPointerEventsResult()0%110100%
get_Descriptor()0%110100%
PBPointerEventsResult()0%110100%
PBPointerEventsResult(...)0%12300%
Clone()0%2100%
ClearAnalog()0%110100%
Equals(...)0%2100%
Equals(...)0%90900%
GetHashCode()0%72800%
ToString()0%2100%
WriteTo(...)0%72800%
CalculateSize()0%72800%
MergeFrom(...)0%90900%
MergeFrom(...)0%1101000%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/PointerEventsResult.gen.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/pointer_events_result.proto
 4// </auto-generated>
 5#pragma warning disable 1591, 0612, 3021
 6#region Designer generated code
 7
 8using pb = global::Google.Protobuf;
 9using pbc = global::Google.Protobuf.Collections;
 10using pbr = global::Google.Protobuf.Reflection;
 11using scg = global::System.Collections.Generic;
 12namespace DCL.ECSComponents {
 13
 14  /// <summary>Holder for reflection information generated from decentraland/sdk/components/pointer_events_result.proto<
 15  public static partial class PointerEventsResultReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/pointer_events_result.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static PointerEventsResultReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "CjdkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcG9pbnRlcl9ldmVudHNf",
 28            "cmVzdWx0LnByb3RvEhtkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMaNWRl",
 29            "Y2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9jb21tb24vaW5wdXRfYWN0aW9u",
 30            "LnByb3RvGjRkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvY29tbW9uL3Jh",
 31            "eWNhc3RfaGl0LnByb3RvIqICChVQQlBvaW50ZXJFdmVudHNSZXN1bHQSPwoG",
 32            "YnV0dG9uGAEgASgOMi8uZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzLmNv",
 33            "bW1vbi5JbnB1dEFjdGlvbhI7CgNoaXQYAiABKAsyLi5kZWNlbnRyYWxhbmQu",
 34            "c2RrLmNvbXBvbmVudHMuY29tbW9uLlJheWNhc3RIaXQSQwoFc3RhdGUYBCAB",
 35            "KA4yNC5kZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMuY29tbW9uLlBvaW50",
 36            "ZXJFdmVudFR5cGUSEQoJdGltZXN0YW1wGAUgASgNEhMKBmFuYWxvZxgGIAEo",
 37            "AkgAiAEBEhMKC3RpY2tfbnVtYmVyGAcgASgNQgkKB19hbmFsb2dCFKoCEURD",
 38            "TC5FQ1NDb21wb25lbnRzYgZwcm90bzM="));
 39      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 40          new pbr::FileDescriptor[] { global::DCL.ECSComponents.InputActionReflection.Descriptor, global::DCL.ECSCompone
 41          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 42            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBPointerEventsResult), global::DCL.ECSCompon
 43          }));
 44    }
 45    #endregion
 46
 47  }
 48  #region Messages
 49  /// <summary>
 50  /// renderer append a new object of this in each command, there can be many commands per frames
 51  /// </summary>
 52  public sealed partial class PBPointerEventsResult : pb::IMessage<PBPointerEventsResult>
 53  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 54      , pb::IBufferMessage
 55  #endif
 56  {
 157    private static readonly pb::MessageParser<PBPointerEventsResult> _parser = new pb::MessageParser<PBPointerEventsResu
 58    private pb::UnknownFieldSet _unknownFields;
 59    private int _hasBits0;
 60    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 61    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 162    public static pb::MessageParser<PBPointerEventsResult> Parser { get { return _parser; } }
 63
 64    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 65    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 66    public static pbr::MessageDescriptor Descriptor {
 367      get { return global::DCL.ECSComponents.PointerEventsResultReflection.Descriptor.MessageTypes[0]; }
 68    }
 69
 70    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 71    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 72    pbr::MessageDescriptor pb::IMessage.Descriptor {
 373      get { return Descriptor; }
 74    }
 75
 76    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 77    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 378    public PBPointerEventsResult() {
 79      OnConstruction();
 380    }
 81
 82    partial void OnConstruction();
 83
 84    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 85    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 086    public PBPointerEventsResult(PBPointerEventsResult other) : this() {
 087      _hasBits0 = other._hasBits0;
 088      button_ = other.button_;
 089      hit_ = other.hit_ != null ? other.hit_.Clone() : null;
 090      state_ = other.state_;
 091      timestamp_ = other.timestamp_;
 092      analog_ = other.analog_;
 093      tickNumber_ = other.tickNumber_;
 094      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 095    }
 96
 97    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 98    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 99    public PBPointerEventsResult Clone() {
 0100      return new PBPointerEventsResult(this);
 101    }
 102
 103    /// <summary>Field number for the "button" field.</summary>
 104    public const int ButtonFieldNumber = 1;
 105    private global::DCL.ECSComponents.InputAction button_ = global::DCL.ECSComponents.InputAction.IaPointer;
 106    /// <summary>
 107    /// identifier of the input
 108    /// </summary>
 109    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 110    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 111    public global::DCL.ECSComponents.InputAction Button {
 0112      get { return button_; }
 113      set {
 9114        button_ = value;
 9115      }
 116    }
 117
 118    /// <summary>Field number for the "hit" field.</summary>
 119    public const int HitFieldNumber = 2;
 120    private global::DCL.ECSComponents.RaycastHit hit_;
 121    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 122    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 123    public global::DCL.ECSComponents.RaycastHit Hit {
 0124      get { return hit_; }
 125      set {
 9126        hit_ = value;
 9127      }
 128    }
 129
 130    /// <summary>Field number for the "state" field.</summary>
 131    public const int StateFieldNumber = 4;
 132    private global::DCL.ECSComponents.PointerEventType state_ = global::DCL.ECSComponents.PointerEventType.PetUp;
 133    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 134    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 135    public global::DCL.ECSComponents.PointerEventType State {
 0136      get { return state_; }
 137      set {
 9138        state_ = value;
 9139      }
 140    }
 141
 142    /// <summary>Field number for the "timestamp" field.</summary>
 143    public const int TimestampFieldNumber = 5;
 144    private uint timestamp_;
 145    /// <summary>
 146    /// monotonic counter
 147    /// </summary>
 148    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 149    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 150    public uint Timestamp {
 0151      get { return timestamp_; }
 152      set {
 9153        timestamp_ = value;
 9154      }
 155    }
 156
 157    /// <summary>Field number for the "analog" field.</summary>
 158    public const int AnalogFieldNumber = 6;
 159    private float analog_;
 160    /// <summary>
 161    /// if the input is analog then we store it here
 162    /// </summary>
 163    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 164    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 165    public float Analog {
 0166      get { if ((_hasBits0 & 1) != 0) { return analog_; } else { return 0F; } }
 167      set {
 0168        _hasBits0 |= 1;
 0169        analog_ = value;
 0170      }
 171    }
 172    /// <summary>Gets whether the "analog" field is set</summary>
 173    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 174    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 175    public bool HasAnalog {
 0176      get { return (_hasBits0 & 1) != 0; }
 177    }
 178    /// <summary>Clears the value of the "analog" field</summary>
 179    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 180    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 181    public void ClearAnalog() {
 3182      _hasBits0 &= ~1;
 3183    }
 184
 185    /// <summary>Field number for the "tick_number" field.</summary>
 186    public const int TickNumberFieldNumber = 7;
 187    private uint tickNumber_;
 188    /// <summary>
 189    /// number of tick in which the event was produced, equals to EngineInfo.tick_number
 190    /// </summary>
 191    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 192    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 193    public uint TickNumber {
 1194      get { return tickNumber_; }
 195      set {
 9196        tickNumber_ = value;
 9197      }
 198    }
 199
 200    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 201    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 202    public override bool Equals(object other) {
 0203      return Equals(other as PBPointerEventsResult);
 204    }
 205
 206    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 207    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 208    public bool Equals(PBPointerEventsResult other) {
 0209      if (ReferenceEquals(other, null)) {
 0210        return false;
 211      }
 0212      if (ReferenceEquals(other, this)) {
 0213        return true;
 214      }
 0215      if (Button != other.Button) return false;
 0216      if (!object.Equals(Hit, other.Hit)) return false;
 0217      if (State != other.State) return false;
 0218      if (Timestamp != other.Timestamp) return false;
 0219      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Analog, other.Analog)) return false;
 0220      if (TickNumber != other.TickNumber) return false;
 0221      return Equals(_unknownFields, other._unknownFields);
 222    }
 223
 224    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 225    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 226    public override int GetHashCode() {
 0227      int hash = 1;
 0228      if (Button != global::DCL.ECSComponents.InputAction.IaPointer) hash ^= Button.GetHashCode();
 0229      if (hit_ != null) hash ^= Hit.GetHashCode();
 0230      if (State != global::DCL.ECSComponents.PointerEventType.PetUp) hash ^= State.GetHashCode();
 0231      if (Timestamp != 0) hash ^= Timestamp.GetHashCode();
 0232      if (HasAnalog) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Analog);
 0233      if (TickNumber != 0) hash ^= TickNumber.GetHashCode();
 0234      if (_unknownFields != null) {
 0235        hash ^= _unknownFields.GetHashCode();
 236      }
 0237      return hash;
 238    }
 239
 240    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 241    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 242    public override string ToString() {
 0243      return pb::JsonFormatter.ToDiagnosticString(this);
 244    }
 245
 246    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 247    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 248    public void WriteTo(pb::CodedOutputStream output) {
 249    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 250      output.WriteRawMessage(this);
 251    #else
 0252      if (Button != global::DCL.ECSComponents.InputAction.IaPointer) {
 0253        output.WriteRawTag(8);
 0254        output.WriteEnum((int) Button);
 255      }
 0256      if (hit_ != null) {
 0257        output.WriteRawTag(18);
 0258        output.WriteMessage(Hit);
 259      }
 0260      if (State != global::DCL.ECSComponents.PointerEventType.PetUp) {
 0261        output.WriteRawTag(32);
 0262        output.WriteEnum((int) State);
 263      }
 0264      if (Timestamp != 0) {
 0265        output.WriteRawTag(40);
 0266        output.WriteUInt32(Timestamp);
 267      }
 0268      if (HasAnalog) {
 0269        output.WriteRawTag(53);
 0270        output.WriteFloat(Analog);
 271      }
 0272      if (TickNumber != 0) {
 0273        output.WriteRawTag(56);
 0274        output.WriteUInt32(TickNumber);
 275      }
 0276      if (_unknownFields != null) {
 0277        _unknownFields.WriteTo(output);
 278      }
 279    #endif
 0280    }
 281
 282    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 283    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 284    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 285    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 286      if (Button != global::DCL.ECSComponents.InputAction.IaPointer) {
 287        output.WriteRawTag(8);
 288        output.WriteEnum((int) Button);
 289      }
 290      if (hit_ != null) {
 291        output.WriteRawTag(18);
 292        output.WriteMessage(Hit);
 293      }
 294      if (State != global::DCL.ECSComponents.PointerEventType.PetUp) {
 295        output.WriteRawTag(32);
 296        output.WriteEnum((int) State);
 297      }
 298      if (Timestamp != 0) {
 299        output.WriteRawTag(40);
 300        output.WriteUInt32(Timestamp);
 301      }
 302      if (HasAnalog) {
 303        output.WriteRawTag(53);
 304        output.WriteFloat(Analog);
 305      }
 306      if (TickNumber != 0) {
 307        output.WriteRawTag(56);
 308        output.WriteUInt32(TickNumber);
 309      }
 310      if (_unknownFields != null) {
 311        _unknownFields.WriteTo(ref output);
 312      }
 313    }
 314    #endif
 315
 316    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 317    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 318    public int CalculateSize() {
 0319      int size = 0;
 0320      if (Button != global::DCL.ECSComponents.InputAction.IaPointer) {
 0321        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Button);
 322      }
 0323      if (hit_ != null) {
 0324        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Hit);
 325      }
 0326      if (State != global::DCL.ECSComponents.PointerEventType.PetUp) {
 0327        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State);
 328      }
 0329      if (Timestamp != 0) {
 0330        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Timestamp);
 331      }
 0332      if (HasAnalog) {
 0333        size += 1 + 4;
 334      }
 0335      if (TickNumber != 0) {
 0336        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TickNumber);
 337      }
 0338      if (_unknownFields != null) {
 0339        size += _unknownFields.CalculateSize();
 340      }
 0341      return size;
 342    }
 343
 344    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 345    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 346    public void MergeFrom(PBPointerEventsResult other) {
 0347      if (other == null) {
 0348        return;
 349      }
 0350      if (other.Button != global::DCL.ECSComponents.InputAction.IaPointer) {
 0351        Button = other.Button;
 352      }
 0353      if (other.hit_ != null) {
 0354        if (hit_ == null) {
 0355          Hit = new global::DCL.ECSComponents.RaycastHit();
 356        }
 0357        Hit.MergeFrom(other.Hit);
 358      }
 0359      if (other.State != global::DCL.ECSComponents.PointerEventType.PetUp) {
 0360        State = other.State;
 361      }
 0362      if (other.Timestamp != 0) {
 0363        Timestamp = other.Timestamp;
 364      }
 0365      if (other.HasAnalog) {
 0366        Analog = other.Analog;
 367      }
 0368      if (other.TickNumber != 0) {
 0369        TickNumber = other.TickNumber;
 370      }
 0371      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0372    }
 373
 374    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 375    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 376    public void MergeFrom(pb::CodedInputStream input) {
 377    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 378      input.ReadRawMessage(this);
 379    #else
 380      uint tag;
 0381      while ((tag = input.ReadTag()) != 0) {
 382        switch(tag) {
 383          default:
 0384            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0385            break;
 386          case 8: {
 0387            Button = (global::DCL.ECSComponents.InputAction) input.ReadEnum();
 0388            break;
 389          }
 390          case 18: {
 0391            if (hit_ == null) {
 0392              Hit = new global::DCL.ECSComponents.RaycastHit();
 393            }
 0394            input.ReadMessage(Hit);
 0395            break;
 396          }
 397          case 32: {
 0398            State = (global::DCL.ECSComponents.PointerEventType) input.ReadEnum();
 0399            break;
 400          }
 401          case 40: {
 0402            Timestamp = input.ReadUInt32();
 0403            break;
 404          }
 405          case 53: {
 0406            Analog = input.ReadFloat();
 0407            break;
 408          }
 409          case 56: {
 0410            TickNumber = input.ReadUInt32();
 411            break;
 412          }
 413        }
 414      }
 415    #endif
 0416    }
 417
 418    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 419    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 420    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 421    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 422      uint tag;
 423      while ((tag = input.ReadTag()) != 0) {
 424        switch(tag) {
 425          default:
 426            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 427            break;
 428          case 8: {
 429            Button = (global::DCL.ECSComponents.InputAction) input.ReadEnum();
 430            break;
 431          }
 432          case 18: {
 433            if (hit_ == null) {
 434              Hit = new global::DCL.ECSComponents.RaycastHit();
 435            }
 436            input.ReadMessage(Hit);
 437            break;
 438          }
 439          case 32: {
 440            State = (global::DCL.ECSComponents.PointerEventType) input.ReadEnum();
 441            break;
 442          }
 443          case 40: {
 444            Timestamp = input.ReadUInt32();
 445            break;
 446          }
 447          case 53: {
 448            Analog = input.ReadFloat();
 449            break;
 450          }
 451          case 56: {
 452            TickNumber = input.ReadUInt32();
 453            break;
 454          }
 455        }
 456      }
 457    }
 458    #endif
 459
 460  }
 461
 462  #endregion
 463
 464}
 465
 466#endregion Designer generated code