< Summary

Class:DCL.ECSComponents.PBVideoEvent
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/VideoEvent.gen.cs
Covered lines:16
Uncovered lines:94
Coverable lines:110
Total lines:407
Line coverage:14.5% (16 of 110)
Covered branches:0
Total branches:0
Covered methods:10
Total methods:25
Method coverage:40% (10 of 25)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBVideoEvent()0%110100%
get_Descriptor()0%2100%
PBVideoEvent()0%110100%
PBVideoEvent(...)0%2100%
Clone()0%2100%
Equals(...)0%2100%
Equals(...)0%72800%
GetHashCode()0%56700%
ToString()0%2100%
WriteTo(...)0%56700%
CalculateSize()0%56700%
MergeFrom(...)0%56700%
MergeFrom(...)0%72800%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/video_event.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/video_event.proto</summary>
 15  public static partial class VideoEventReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/video_event.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static VideoEventReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "Ci1kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdmlkZW9fZXZlbnQucHJv",
 28            "dG8SG2RlY2VudHJhbGFuZC5zZGsuY29tcG9uZW50cyKcAQoMUEJWaWRlb0V2",
 29            "ZW50EhEKCXRpbWVzdGFtcBgBIAEoDRITCgt0aWNrX251bWJlchgCIAEoDRIW",
 30            "Cg5jdXJyZW50X29mZnNldBgDIAEoAhIUCgx2aWRlb19sZW5ndGgYBCABKAIS",
 31            "NgoFc3RhdGUYBSABKA4yJy5kZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMu",
 32            "VmlkZW9TdGF0ZSqGAQoKVmlkZW9TdGF0ZRILCgdWU19OT05FEAASDAoIVlNf",
 33            "RVJST1IQARIOCgpWU19MT0FESU5HEAISDAoIVlNfUkVBRFkQAxIOCgpWU19Q",
 34            "TEFZSU5HEAQSEAoMVlNfQlVGRkVSSU5HEAUSDgoKVlNfU0VFS0lORxAGEg0K",
 35            "CVZTX1BBVVNFRBAHQhSqAhFEQ0wuRUNTQ29tcG9uZW50c2IGcHJvdG8z"));
 36      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 37          new pbr::FileDescriptor[] { },
 38          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::DCL.ECSComponents.VideoState), }, null, new pbr::Generated
 39            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBVideoEvent), global::DCL.ECSComponents.PBVi
 40          }));
 41    }
 42    #endregion
 43
 44  }
 45  #region Enums
 46  public enum VideoState {
 47    [pbr::OriginalName("VS_NONE")] VsNone = 0,
 48    [pbr::OriginalName("VS_ERROR")] VsError = 1,
 49    [pbr::OriginalName("VS_LOADING")] VsLoading = 2,
 50    [pbr::OriginalName("VS_READY")] VsReady = 3,
 51    [pbr::OriginalName("VS_PLAYING")] VsPlaying = 4,
 52    [pbr::OriginalName("VS_BUFFERING")] VsBuffering = 5,
 53    [pbr::OriginalName("VS_SEEKING")] VsSeeking = 6,
 54    [pbr::OriginalName("VS_PAUSED")] VsPaused = 7,
 55  }
 56
 57  #endregion
 58
 59  #region Messages
 60  public sealed partial class PBVideoEvent : pb::IMessage<PBVideoEvent>
 61  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 62      , pb::IBufferMessage
 63  #endif
 64  {
 165    private static readonly pb::MessageParser<PBVideoEvent> _parser = new pb::MessageParser<PBVideoEvent>(() => new PBVi
 66    private pb::UnknownFieldSet _unknownFields;
 67    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 68    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 069    public static pb::MessageParser<PBVideoEvent> Parser { get { return _parser; } }
 70
 71    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 72    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 73    public static pbr::MessageDescriptor Descriptor {
 074      get { return global::DCL.ECSComponents.VideoEventReflection.Descriptor.MessageTypes[0]; }
 75    }
 76
 77    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 78    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 79    pbr::MessageDescriptor pb::IMessage.Descriptor {
 080      get { return Descriptor; }
 81    }
 82
 83    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 84    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 585    public PBVideoEvent() {
 86      OnConstruction();
 587    }
 88
 89    partial void OnConstruction();
 90
 91    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 92    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 093    public PBVideoEvent(PBVideoEvent other) : this() {
 094      timestamp_ = other.timestamp_;
 095      tickNumber_ = other.tickNumber_;
 096      currentOffset_ = other.currentOffset_;
 097      videoLength_ = other.videoLength_;
 098      state_ = other.state_;
 099      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 0100    }
 101
 102    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 103    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 104    public PBVideoEvent Clone() {
 0105      return new PBVideoEvent(this);
 106    }
 107
 108    /// <summary>Field number for the "timestamp" field.</summary>
 109    public const int TimestampFieldNumber = 1;
 110    private uint timestamp_;
 111    /// <summary>
 112    /// monotonic counter
 113    /// </summary>
 114    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 115    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 116    public uint Timestamp {
 3117      get { return timestamp_; }
 118      set {
 5119        timestamp_ = value;
 5120      }
 121    }
 122
 123    /// <summary>Field number for the "tick_number" field.</summary>
 124    public const int TickNumberFieldNumber = 2;
 125    private uint tickNumber_;
 126    /// <summary>
 127    /// number of tick in which the event was produced, equals to EngineInfo.tick_number
 128    /// </summary>
 129    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 130    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 131    public uint TickNumber {
 1132      get { return tickNumber_; }
 133      set {
 5134        tickNumber_ = value;
 5135      }
 136    }
 137
 138    /// <summary>Field number for the "current_offset" field.</summary>
 139    public const int CurrentOffsetFieldNumber = 3;
 140    private float currentOffset_;
 141    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 142    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 143    public float CurrentOffset {
 0144      get { return currentOffset_; }
 145      set {
 5146        currentOffset_ = value;
 5147      }
 148    }
 149
 150    /// <summary>Field number for the "video_length" field.</summary>
 151    public const int VideoLengthFieldNumber = 4;
 152    private float videoLength_;
 153    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 154    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 155    public float VideoLength {
 0156      get { return videoLength_; }
 157      set {
 5158        videoLength_ = value;
 5159      }
 160    }
 161
 162    /// <summary>Field number for the "state" field.</summary>
 163    public const int StateFieldNumber = 5;
 164    private global::DCL.ECSComponents.VideoState state_ = global::DCL.ECSComponents.VideoState.VsNone;
 165    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 166    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 167    public global::DCL.ECSComponents.VideoState State {
 3168      get { return state_; }
 169      set {
 5170        state_ = value;
 5171      }
 172    }
 173
 174    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 175    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 176    public override bool Equals(object other) {
 0177      return Equals(other as PBVideoEvent);
 178    }
 179
 180    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 181    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 182    public bool Equals(PBVideoEvent other) {
 0183      if (ReferenceEquals(other, null)) {
 0184        return false;
 185      }
 0186      if (ReferenceEquals(other, this)) {
 0187        return true;
 188      }
 0189      if (Timestamp != other.Timestamp) return false;
 0190      if (TickNumber != other.TickNumber) return false;
 0191      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(CurrentOffset, other.CurrentOffset)) retu
 0192      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(VideoLength, other.VideoLength)) return f
 0193      if (State != other.State) return false;
 0194      return Equals(_unknownFields, other._unknownFields);
 195    }
 196
 197    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 198    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 199    public override int GetHashCode() {
 0200      int hash = 1;
 0201      if (Timestamp != 0) hash ^= Timestamp.GetHashCode();
 0202      if (TickNumber != 0) hash ^= TickNumber.GetHashCode();
 0203      if (CurrentOffset != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(CurrentO
 0204      if (VideoLength != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(VideoLengt
 0205      if (State != global::DCL.ECSComponents.VideoState.VsNone) hash ^= State.GetHashCode();
 0206      if (_unknownFields != null) {
 0207        hash ^= _unknownFields.GetHashCode();
 208      }
 0209      return hash;
 210    }
 211
 212    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 213    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 214    public override string ToString() {
 0215      return pb::JsonFormatter.ToDiagnosticString(this);
 216    }
 217
 218    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 219    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 220    public void WriteTo(pb::CodedOutputStream output) {
 221    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 222      output.WriteRawMessage(this);
 223    #else
 0224      if (Timestamp != 0) {
 0225        output.WriteRawTag(8);
 0226        output.WriteUInt32(Timestamp);
 227      }
 0228      if (TickNumber != 0) {
 0229        output.WriteRawTag(16);
 0230        output.WriteUInt32(TickNumber);
 231      }
 0232      if (CurrentOffset != 0F) {
 0233        output.WriteRawTag(29);
 0234        output.WriteFloat(CurrentOffset);
 235      }
 0236      if (VideoLength != 0F) {
 0237        output.WriteRawTag(37);
 0238        output.WriteFloat(VideoLength);
 239      }
 0240      if (State != global::DCL.ECSComponents.VideoState.VsNone) {
 0241        output.WriteRawTag(40);
 0242        output.WriteEnum((int) State);
 243      }
 0244      if (_unknownFields != null) {
 0245        _unknownFields.WriteTo(output);
 246      }
 247    #endif
 0248    }
 249
 250    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 251    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 252    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 253    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 254      if (Timestamp != 0) {
 255        output.WriteRawTag(8);
 256        output.WriteUInt32(Timestamp);
 257      }
 258      if (TickNumber != 0) {
 259        output.WriteRawTag(16);
 260        output.WriteUInt32(TickNumber);
 261      }
 262      if (CurrentOffset != 0F) {
 263        output.WriteRawTag(29);
 264        output.WriteFloat(CurrentOffset);
 265      }
 266      if (VideoLength != 0F) {
 267        output.WriteRawTag(37);
 268        output.WriteFloat(VideoLength);
 269      }
 270      if (State != global::DCL.ECSComponents.VideoState.VsNone) {
 271        output.WriteRawTag(40);
 272        output.WriteEnum((int) State);
 273      }
 274      if (_unknownFields != null) {
 275        _unknownFields.WriteTo(ref output);
 276      }
 277    }
 278    #endif
 279
 280    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 281    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 282    public int CalculateSize() {
 0283      int size = 0;
 0284      if (Timestamp != 0) {
 0285        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Timestamp);
 286      }
 0287      if (TickNumber != 0) {
 0288        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TickNumber);
 289      }
 0290      if (CurrentOffset != 0F) {
 0291        size += 1 + 4;
 292      }
 0293      if (VideoLength != 0F) {
 0294        size += 1 + 4;
 295      }
 0296      if (State != global::DCL.ECSComponents.VideoState.VsNone) {
 0297        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State);
 298      }
 0299      if (_unknownFields != null) {
 0300        size += _unknownFields.CalculateSize();
 301      }
 0302      return size;
 303    }
 304
 305    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 306    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 307    public void MergeFrom(PBVideoEvent other) {
 0308      if (other == null) {
 0309        return;
 310      }
 0311      if (other.Timestamp != 0) {
 0312        Timestamp = other.Timestamp;
 313      }
 0314      if (other.TickNumber != 0) {
 0315        TickNumber = other.TickNumber;
 316      }
 0317      if (other.CurrentOffset != 0F) {
 0318        CurrentOffset = other.CurrentOffset;
 319      }
 0320      if (other.VideoLength != 0F) {
 0321        VideoLength = other.VideoLength;
 322      }
 0323      if (other.State != global::DCL.ECSComponents.VideoState.VsNone) {
 0324        State = other.State;
 325      }
 0326      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0327    }
 328
 329    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 330    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 331    public void MergeFrom(pb::CodedInputStream input) {
 332    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 333      input.ReadRawMessage(this);
 334    #else
 335      uint tag;
 0336      while ((tag = input.ReadTag()) != 0) {
 337        switch(tag) {
 338          default:
 0339            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0340            break;
 341          case 8: {
 0342            Timestamp = input.ReadUInt32();
 0343            break;
 344          }
 345          case 16: {
 0346            TickNumber = input.ReadUInt32();
 0347            break;
 348          }
 349          case 29: {
 0350            CurrentOffset = input.ReadFloat();
 0351            break;
 352          }
 353          case 37: {
 0354            VideoLength = input.ReadFloat();
 0355            break;
 356          }
 357          case 40: {
 0358            State = (global::DCL.ECSComponents.VideoState) input.ReadEnum();
 359            break;
 360          }
 361        }
 362      }
 363    #endif
 0364    }
 365
 366    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 367    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 368    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 369    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 370      uint tag;
 371      while ((tag = input.ReadTag()) != 0) {
 372        switch(tag) {
 373          default:
 374            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 375            break;
 376          case 8: {
 377            Timestamp = input.ReadUInt32();
 378            break;
 379          }
 380          case 16: {
 381            TickNumber = input.ReadUInt32();
 382            break;
 383          }
 384          case 29: {
 385            CurrentOffset = input.ReadFloat();
 386            break;
 387          }
 388          case 37: {
 389            VideoLength = input.ReadFloat();
 390            break;
 391          }
 392          case 40: {
 393            State = (global::DCL.ECSComponents.VideoState) input.ReadEnum();
 394            break;
 395          }
 396        }
 397      }
 398    }
 399    #endif
 400
 401  }
 402
 403  #endregion
 404
 405}
 406
 407#endregion Designer generated code