< Summary

Class:DCL.ECSComponents.PBAudioStream
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/AudioStream.gen.cs
Covered lines:16
Uncovered lines:74
Coverable lines:90
Total lines:351
Line coverage:17.7% (16 of 90)
Covered branches:0
Total branches:0
Covered methods:9
Total methods:25
Method coverage:36% (9 of 25)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBAudioStream()0%110100%
get_Descriptor()0%2100%
PBAudioStream(...)0%2100%
Clone()0%2100%
ClearPlaying()0%2100%
ClearVolume()0%2100%
PBAudioStream()0%110100%
Equals(...)0%2100%
Equals(...)0%42600%
GetHashCode()0%30500%
ToString()0%2100%
WriteTo(...)0%30500%
CalculateSize()0%30500%
MergeFrom(...)0%30500%
MergeFrom(...)0%30500%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/audio_stream.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/audio_stream.proto</summary>
 15  public static partial class AudioStreamReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/audio_stream.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static AudioStreamReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "Ci5kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXVkaW9fc3RyZWFtLnBy",
 28            "b3RvEhtkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMiXgoNUEJBdWRpb1N0",
 29            "cmVhbRIUCgdwbGF5aW5nGAEgASgISACIAQESEwoGdm9sdW1lGAIgASgCSAGI",
 30            "AQESCwoDdXJsGAMgASgJQgoKCF9wbGF5aW5nQgkKB192b2x1bWVCFKoCEURD",
 31            "TC5FQ1NDb21wb25lbnRzYgZwcm90bzM="));
 32      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 33          new pbr::FileDescriptor[] { },
 34          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 35            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBAudioStream), global::DCL.ECSComponents.PBA
 36          }));
 37    }
 38    #endregion
 39
 40  }
 41  #region Messages
 42  /// <summary>
 43  /// The AudioStream component can play external audio clips given a URL, streaming it in real-time.
 44  ///
 45  /// Despite being attached to a particular entity, the sound is not affected by its position.
 46  /// </summary>
 47  public sealed partial class PBAudioStream : pb::IMessage<PBAudioStream>
 48  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 49      , pb::IBufferMessage
 50  #endif
 51  {
 152    private static readonly pb::MessageParser<PBAudioStream> _parser = new pb::MessageParser<PBAudioStream>(() => new PB
 53    private pb::UnknownFieldSet _unknownFields;
 54    private int _hasBits0;
 55    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 56    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 057    public static pb::MessageParser<PBAudioStream> Parser { get { return _parser; } }
 58
 59    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 60    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 61    public static pbr::MessageDescriptor Descriptor {
 062      get { return global::DCL.ECSComponents.AudioStreamReflection.Descriptor.MessageTypes[0]; }
 63    }
 64
 65    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 66    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 67    pbr::MessageDescriptor pb::IMessage.Descriptor {
 068      get { return Descriptor; }
 69    }
 70
 71    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 72    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 1073    public PBAudioStream() {
 74      OnConstruction();
 1075    }
 76
 77    partial void OnConstruction();
 78
 79    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 80    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 081    public PBAudioStream(PBAudioStream other) : this() {
 082      _hasBits0 = other._hasBits0;
 083      playing_ = other.playing_;
 084      volume_ = other.volume_;
 085      url_ = other.url_;
 086      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 087    }
 88
 89    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 90    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 91    public PBAudioStream Clone() {
 092      return new PBAudioStream(this);
 93    }
 94
 95    /// <summary>Field number for the "playing" field.</summary>
 96    public const int PlayingFieldNumber = 1;
 97    private bool playing_;
 98    /// <summary>
 99    /// whether the clip is currently playing
 100    /// </summary>
 101    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 102    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 103    public bool Playing {
 6104      get { if ((_hasBits0 & 1) != 0) { return playing_; } else { return false; } }
 105      set {
 16106        _hasBits0 |= 1;
 16107        playing_ = value;
 16108      }
 109    }
 110    /// <summary>Gets whether the "playing" field is set</summary>
 111    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 112    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 113    public bool HasPlaying {
 0114      get { return (_hasBits0 & 1) != 0; }
 115    }
 116    /// <summary>Clears the value of the "playing" field</summary>
 117    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 118    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 119    public void ClearPlaying() {
 0120      _hasBits0 &= ~1;
 0121    }
 122
 123    /// <summary>Field number for the "volume" field.</summary>
 124    public const int VolumeFieldNumber = 2;
 125    private float volume_;
 126    /// <summary>
 127    /// the audio volume (default: 1.0)
 128    /// </summary>
 129    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 130    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 131    public float Volume {
 26132      get { if ((_hasBits0 & 2) != 0) { return volume_; } else { return 0F; } }
 133      set {
 12134        _hasBits0 |= 2;
 12135        volume_ = value;
 12136      }
 137    }
 138    /// <summary>Gets whether the "volume" field is set</summary>
 139    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 140    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 141    public bool HasVolume {
 13142      get { return (_hasBits0 & 2) != 0; }
 143    }
 144    /// <summary>Clears the value of the "volume" field</summary>
 145    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 146    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 147    public void ClearVolume() {
 0148      _hasBits0 &= ~2;
 0149    }
 150
 151    /// <summary>Field number for the "url" field.</summary>
 152    public const int UrlFieldNumber = 3;
 10153    private string url_ = "";
 154    /// <summary>
 155    /// the audio stream HTTP URL
 156    /// </summary>
 157    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 158    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 159    public string Url {
 17160      get { return url_; }
 161      set {
 13162        url_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 13163      }
 164    }
 165
 166    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 167    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 168    public override bool Equals(object other) {
 0169      return Equals(other as PBAudioStream);
 170    }
 171
 172    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 173    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 174    public bool Equals(PBAudioStream other) {
 0175      if (ReferenceEquals(other, null)) {
 0176        return false;
 177      }
 0178      if (ReferenceEquals(other, this)) {
 0179        return true;
 180      }
 0181      if (Playing != other.Playing) return false;
 0182      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Volume, other.Volume)) return false;
 0183      if (Url != other.Url) return false;
 0184      return Equals(_unknownFields, other._unknownFields);
 185    }
 186
 187    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 188    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 189    public override int GetHashCode() {
 0190      int hash = 1;
 0191      if (HasPlaying) hash ^= Playing.GetHashCode();
 0192      if (HasVolume) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Volume);
 0193      if (Url.Length != 0) hash ^= Url.GetHashCode();
 0194      if (_unknownFields != null) {
 0195        hash ^= _unknownFields.GetHashCode();
 196      }
 0197      return hash;
 198    }
 199
 200    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 201    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 202    public override string ToString() {
 0203      return pb::JsonFormatter.ToDiagnosticString(this);
 204    }
 205
 206    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 207    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 208    public void WriteTo(pb::CodedOutputStream output) {
 209    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 210      output.WriteRawMessage(this);
 211    #else
 0212      if (HasPlaying) {
 0213        output.WriteRawTag(8);
 0214        output.WriteBool(Playing);
 215      }
 0216      if (HasVolume) {
 0217        output.WriteRawTag(21);
 0218        output.WriteFloat(Volume);
 219      }
 0220      if (Url.Length != 0) {
 0221        output.WriteRawTag(26);
 0222        output.WriteString(Url);
 223      }
 0224      if (_unknownFields != null) {
 0225        _unknownFields.WriteTo(output);
 226      }
 227    #endif
 0228    }
 229
 230    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 231    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 232    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 233    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 234      if (HasPlaying) {
 235        output.WriteRawTag(8);
 236        output.WriteBool(Playing);
 237      }
 238      if (HasVolume) {
 239        output.WriteRawTag(21);
 240        output.WriteFloat(Volume);
 241      }
 242      if (Url.Length != 0) {
 243        output.WriteRawTag(26);
 244        output.WriteString(Url);
 245      }
 246      if (_unknownFields != null) {
 247        _unknownFields.WriteTo(ref output);
 248      }
 249    }
 250    #endif
 251
 252    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 253    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 254    public int CalculateSize() {
 0255      int size = 0;
 0256      if (HasPlaying) {
 0257        size += 1 + 1;
 258      }
 0259      if (HasVolume) {
 0260        size += 1 + 4;
 261      }
 0262      if (Url.Length != 0) {
 0263        size += 1 + pb::CodedOutputStream.ComputeStringSize(Url);
 264      }
 0265      if (_unknownFields != null) {
 0266        size += _unknownFields.CalculateSize();
 267      }
 0268      return size;
 269    }
 270
 271    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 272    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 273    public void MergeFrom(PBAudioStream other) {
 0274      if (other == null) {
 0275        return;
 276      }
 0277      if (other.HasPlaying) {
 0278        Playing = other.Playing;
 279      }
 0280      if (other.HasVolume) {
 0281        Volume = other.Volume;
 282      }
 0283      if (other.Url.Length != 0) {
 0284        Url = other.Url;
 285      }
 0286      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0287    }
 288
 289    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 290    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 291    public void MergeFrom(pb::CodedInputStream input) {
 292    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 293      input.ReadRawMessage(this);
 294    #else
 295      uint tag;
 0296      while ((tag = input.ReadTag()) != 0) {
 297        switch(tag) {
 298          default:
 0299            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0300            break;
 301          case 8: {
 0302            Playing = input.ReadBool();
 0303            break;
 304          }
 305          case 21: {
 0306            Volume = input.ReadFloat();
 0307            break;
 308          }
 309          case 26: {
 0310            Url = input.ReadString();
 311            break;
 312          }
 313        }
 314      }
 315    #endif
 0316    }
 317
 318    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 319    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 320    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 321    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 322      uint tag;
 323      while ((tag = input.ReadTag()) != 0) {
 324        switch(tag) {
 325          default:
 326            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 327            break;
 328          case 8: {
 329            Playing = input.ReadBool();
 330            break;
 331          }
 332          case 21: {
 333            Volume = input.ReadFloat();
 334            break;
 335          }
 336          case 26: {
 337            Url = input.ReadString();
 338            break;
 339          }
 340        }
 341      }
 342    }
 343    #endif
 344
 345  }
 346
 347  #endregion
 348
 349}
 350
 351#endregion Designer generated code