< 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:340
Line coverage:17.7% (16 of 90)
Covered branches:0
Total branches:0

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  public sealed partial class PBAudioStream : pb::IMessage<PBAudioStream>
 43  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 44      , pb::IBufferMessage
 45  #endif
 46  {
 147    private static readonly pb::MessageParser<PBAudioStream> _parser = new pb::MessageParser<PBAudioStream>(() => new PB
 48    private pb::UnknownFieldSet _unknownFields;
 49    private int _hasBits0;
 50    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 51    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 052    public static pb::MessageParser<PBAudioStream> Parser { get { return _parser; } }
 53
 54    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 55    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 56    public static pbr::MessageDescriptor Descriptor {
 057      get { return global::DCL.ECSComponents.AudioStreamReflection.Descriptor.MessageTypes[0]; }
 58    }
 59
 60    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 61    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 62    pbr::MessageDescriptor pb::IMessage.Descriptor {
 063      get { return Descriptor; }
 64    }
 65
 66    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 67    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 968    public PBAudioStream() {
 69      OnConstruction();
 970    }
 71
 72    partial void OnConstruction();
 73
 74    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 75    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 076    public PBAudioStream(PBAudioStream other) : this() {
 077      _hasBits0 = other._hasBits0;
 078      playing_ = other.playing_;
 079      volume_ = other.volume_;
 080      url_ = other.url_;
 081      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 082    }
 83
 84    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 85    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 86    public PBAudioStream Clone() {
 087      return new PBAudioStream(this);
 88    }
 89
 90    /// <summary>Field number for the "playing" field.</summary>
 91    public const int PlayingFieldNumber = 1;
 92    private bool playing_;
 93    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 94    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 95    public bool Playing {
 696      get { if ((_hasBits0 & 1) != 0) { return playing_; } else { return false; } }
 97      set {
 1498        _hasBits0 |= 1;
 1499        playing_ = value;
 14100      }
 101    }
 102    /// <summary>Gets whether the "playing" field is set</summary>
 103    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 104    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 105    public bool HasPlaying {
 0106      get { return (_hasBits0 & 1) != 0; }
 107    }
 108    /// <summary>Clears the value of the "playing" field</summary>
 109    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 110    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 111    public void ClearPlaying() {
 0112      _hasBits0 &= ~1;
 0113    }
 114
 115    /// <summary>Field number for the "volume" field.</summary>
 116    public const int VolumeFieldNumber = 2;
 117    private float volume_;
 118    /// <summary>
 119    /// default=1.0f
 120    /// </summary>
 121    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 122    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 123    public float Volume {
 24124      get { if ((_hasBits0 & 2) != 0) { return volume_; } else { return 0F; } }
 125      set {
 11126        _hasBits0 |= 2;
 11127        volume_ = value;
 11128      }
 129    }
 130    /// <summary>Gets whether the "volume" field is set</summary>
 131    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 132    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 133    public bool HasVolume {
 12134      get { return (_hasBits0 & 2) != 0; }
 135    }
 136    /// <summary>Clears the value of the "volume" field</summary>
 137    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 138    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 139    public void ClearVolume() {
 0140      _hasBits0 &= ~2;
 0141    }
 142
 143    /// <summary>Field number for the "url" field.</summary>
 144    public const int UrlFieldNumber = 3;
 9145    private string url_ = "";
 146    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 147    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 148    public string Url {
 16149      get { return url_; }
 150      set {
 11151        url_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 11152      }
 153    }
 154
 155    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 156    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 157    public override bool Equals(object other) {
 0158      return Equals(other as PBAudioStream);
 159    }
 160
 161    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 162    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 163    public bool Equals(PBAudioStream other) {
 0164      if (ReferenceEquals(other, null)) {
 0165        return false;
 166      }
 0167      if (ReferenceEquals(other, this)) {
 0168        return true;
 169      }
 0170      if (Playing != other.Playing) return false;
 0171      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Volume, other.Volume)) return false;
 0172      if (Url != other.Url) return false;
 0173      return Equals(_unknownFields, other._unknownFields);
 174    }
 175
 176    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 177    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 178    public override int GetHashCode() {
 0179      int hash = 1;
 0180      if (HasPlaying) hash ^= Playing.GetHashCode();
 0181      if (HasVolume) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Volume);
 0182      if (Url.Length != 0) hash ^= Url.GetHashCode();
 0183      if (_unknownFields != null) {
 0184        hash ^= _unknownFields.GetHashCode();
 185      }
 0186      return hash;
 187    }
 188
 189    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 190    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 191    public override string ToString() {
 0192      return pb::JsonFormatter.ToDiagnosticString(this);
 193    }
 194
 195    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 196    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 197    public void WriteTo(pb::CodedOutputStream output) {
 198    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 199      output.WriteRawMessage(this);
 200    #else
 0201      if (HasPlaying) {
 0202        output.WriteRawTag(8);
 0203        output.WriteBool(Playing);
 204      }
 0205      if (HasVolume) {
 0206        output.WriteRawTag(21);
 0207        output.WriteFloat(Volume);
 208      }
 0209      if (Url.Length != 0) {
 0210        output.WriteRawTag(26);
 0211        output.WriteString(Url);
 212      }
 0213      if (_unknownFields != null) {
 0214        _unknownFields.WriteTo(output);
 215      }
 216    #endif
 0217    }
 218
 219    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 220    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 221    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 222    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 223      if (HasPlaying) {
 224        output.WriteRawTag(8);
 225        output.WriteBool(Playing);
 226      }
 227      if (HasVolume) {
 228        output.WriteRawTag(21);
 229        output.WriteFloat(Volume);
 230      }
 231      if (Url.Length != 0) {
 232        output.WriteRawTag(26);
 233        output.WriteString(Url);
 234      }
 235      if (_unknownFields != null) {
 236        _unknownFields.WriteTo(ref output);
 237      }
 238    }
 239    #endif
 240
 241    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 242    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 243    public int CalculateSize() {
 0244      int size = 0;
 0245      if (HasPlaying) {
 0246        size += 1 + 1;
 247      }
 0248      if (HasVolume) {
 0249        size += 1 + 4;
 250      }
 0251      if (Url.Length != 0) {
 0252        size += 1 + pb::CodedOutputStream.ComputeStringSize(Url);
 253      }
 0254      if (_unknownFields != null) {
 0255        size += _unknownFields.CalculateSize();
 256      }
 0257      return size;
 258    }
 259
 260    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 261    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 262    public void MergeFrom(PBAudioStream other) {
 0263      if (other == null) {
 0264        return;
 265      }
 0266      if (other.HasPlaying) {
 0267        Playing = other.Playing;
 268      }
 0269      if (other.HasVolume) {
 0270        Volume = other.Volume;
 271      }
 0272      if (other.Url.Length != 0) {
 0273        Url = other.Url;
 274      }
 0275      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0276    }
 277
 278    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 279    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 280    public void MergeFrom(pb::CodedInputStream input) {
 281    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 282      input.ReadRawMessage(this);
 283    #else
 284      uint tag;
 0285      while ((tag = input.ReadTag()) != 0) {
 286        switch(tag) {
 287          default:
 0288            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0289            break;
 290          case 8: {
 0291            Playing = input.ReadBool();
 0292            break;
 293          }
 294          case 21: {
 0295            Volume = input.ReadFloat();
 0296            break;
 297          }
 298          case 26: {
 0299            Url = input.ReadString();
 300            break;
 301          }
 302        }
 303      }
 304    #endif
 0305    }
 306
 307    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 308    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 309    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 310    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 311      uint tag;
 312      while ((tag = input.ReadTag()) != 0) {
 313        switch(tag) {
 314          default:
 315            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 316            break;
 317          case 8: {
 318            Playing = input.ReadBool();
 319            break;
 320          }
 321          case 21: {
 322            Volume = input.ReadFloat();
 323            break;
 324          }
 325          case 26: {
 326            Url = input.ReadString();
 327            break;
 328          }
 329        }
 330      }
 331    }
 332    #endif
 333
 334  }
 335
 336  #endregion
 337
 338}
 339
 340#endregion Designer generated code