< Summary

Class:DCL.ECSComponents.PBAudioSource
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/AudioSource.gen.cs
Covered lines:25
Uncovered lines:103
Coverable lines:128
Total lines:445
Line coverage:19.5% (25 of 128)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBAudioSource()0%110100%
get_Descriptor()0%2100%
PBAudioSource(...)0%2100%
Clone()0%2100%
ClearPlaying()0%2100%
ClearVolume()0%2100%
ClearLoop()0%2100%
ClearPitch()0%2100%
PBAudioSource()0%110100%
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/AudioSource.gen.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/audio_source.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_source.proto</summary>
 15  public static partial class AudioSourceReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/audio_source.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static AudioSourceReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "Ci5kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXVkaW9fc291cmNlLnBy",
 28            "b3RvEhtkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMiowEKDVBCQXVkaW9T",
 29            "b3VyY2USFAoHcGxheWluZxgBIAEoCEgAiAEBEhMKBnZvbHVtZRgCIAEoAkgB",
 30            "iAEBEhEKBGxvb3AYAyABKAhIAogBARISCgVwaXRjaBgEIAEoAkgDiAEBEhYK",
 31            "DmF1ZGlvX2NsaXBfdXJsGAUgASgJQgoKCF9wbGF5aW5nQgkKB192b2x1bWVC",
 32            "BwoFX2xvb3BCCAoGX3BpdGNoQhSqAhFEQ0wuRUNTQ29tcG9uZW50c2IGcHJv",
 33            "dG8z"));
 34      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 35          new pbr::FileDescriptor[] { },
 36          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 37            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBAudioSource), global::DCL.ECSComponents.PBA
 38          }));
 39    }
 40    #endregion
 41
 42  }
 43  #region Messages
 44  public sealed partial class PBAudioSource : pb::IMessage<PBAudioSource>
 45  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 46      , pb::IBufferMessage
 47  #endif
 48  {
 149    private static readonly pb::MessageParser<PBAudioSource> _parser = new pb::MessageParser<PBAudioSource>(() => new PB
 50    private pb::UnknownFieldSet _unknownFields;
 51    private int _hasBits0;
 52    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 53    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 054    public static pb::MessageParser<PBAudioSource> Parser { get { return _parser; } }
 55
 56    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 57    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 58    public static pbr::MessageDescriptor Descriptor {
 059      get { return global::DCL.ECSComponents.AudioSourceReflection.Descriptor.MessageTypes[0]; }
 60    }
 61
 62    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 63    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 64    pbr::MessageDescriptor pb::IMessage.Descriptor {
 065      get { return Descriptor; }
 66    }
 67
 68    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 69    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 1370    public PBAudioSource() {
 71      OnConstruction();
 1372    }
 73
 74    partial void OnConstruction();
 75
 76    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 77    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 078    public PBAudioSource(PBAudioSource other) : this() {
 079      _hasBits0 = other._hasBits0;
 080      playing_ = other.playing_;
 081      volume_ = other.volume_;
 082      loop_ = other.loop_;
 083      pitch_ = other.pitch_;
 084      audioClipUrl_ = other.audioClipUrl_;
 085      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 086    }
 87
 88    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 89    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 90    public PBAudioSource Clone() {
 091      return new PBAudioSource(this);
 92    }
 93
 94    /// <summary>Field number for the "playing" field.</summary>
 95    public const int PlayingFieldNumber = 1;
 96    private bool playing_;
 97    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 98    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 99    public bool Playing {
 30100      get { if ((_hasBits0 & 1) != 0) { return playing_; } else { return false; } }
 101      set {
 1102        _hasBits0 |= 1;
 1103        playing_ = value;
 1104      }
 105    }
 106    /// <summary>Gets whether the "playing" field is set</summary>
 107    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 108    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 109    public bool HasPlaying {
 0110      get { return (_hasBits0 & 1) != 0; }
 111    }
 112    /// <summary>Clears the value of the "playing" field</summary>
 113    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 114    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 115    public void ClearPlaying() {
 0116      _hasBits0 &= ~1;
 0117    }
 118
 119    /// <summary>Field number for the "volume" field.</summary>
 120    public const int VolumeFieldNumber = 2;
 121    private float volume_;
 122    /// <summary>
 123    /// default=1.0f
 124    /// </summary>
 125    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 126    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 127    public float Volume {
 20128      get { if ((_hasBits0 & 2) != 0) { return volume_; } else { return 0F; } }
 129      set {
 7130        _hasBits0 |= 2;
 7131        volume_ = value;
 7132      }
 133    }
 134    /// <summary>Gets whether the "volume" field is set</summary>
 135    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 136    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 137    public bool HasVolume {
 15138      get { return (_hasBits0 & 2) != 0; }
 139    }
 140    /// <summary>Clears the value of the "volume" field</summary>
 141    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 142    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 143    public void ClearVolume() {
 0144      _hasBits0 &= ~2;
 0145    }
 146
 147    /// <summary>Field number for the "loop" field.</summary>
 148    public const int LoopFieldNumber = 3;
 149    private bool loop_;
 150    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 151    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 152    public bool Loop {
 28153      get { if ((_hasBits0 & 4) != 0) { return loop_; } else { return false; } }
 154      set {
 3155        _hasBits0 |= 4;
 3156        loop_ = value;
 3157      }
 158    }
 159    /// <summary>Gets whether the "loop" field is set</summary>
 160    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 161    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 162    public bool HasLoop {
 0163      get { return (_hasBits0 & 4) != 0; }
 164    }
 165    /// <summary>Clears the value of the "loop" field</summary>
 166    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 167    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 168    public void ClearLoop() {
 0169      _hasBits0 &= ~4;
 0170    }
 171
 172    /// <summary>Field number for the "pitch" field.</summary>
 173    public const int PitchFieldNumber = 4;
 174    private float pitch_;
 175    /// <summary>
 176    /// default=1.0f
 177    /// </summary>
 178    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 179    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 180    public float Pitch {
 6181      get { if ((_hasBits0 & 8) != 0) { return pitch_; } else { return 0F; } }
 182      set {
 2183        _hasBits0 |= 8;
 2184        pitch_ = value;
 2185      }
 186    }
 187    /// <summary>Gets whether the "pitch" field is set</summary>
 188    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 189    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 190    public bool HasPitch {
 13191      get { return (_hasBits0 & 8) != 0; }
 192    }
 193    /// <summary>Clears the value of the "pitch" field</summary>
 194    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 195    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 196    public void ClearPitch() {
 0197      _hasBits0 &= ~8;
 0198    }
 199
 200    /// <summary>Field number for the "audio_clip_url" field.</summary>
 201    public const int AudioClipUrlFieldNumber = 5;
 13202    private string audioClipUrl_ = "";
 203    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 204    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 205    public string AudioClipUrl {
 26206      get { return audioClipUrl_; }
 207      set {
 13208        audioClipUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 13209      }
 210    }
 211
 212    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 213    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 214    public override bool Equals(object other) {
 0215      return Equals(other as PBAudioSource);
 216    }
 217
 218    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 219    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 220    public bool Equals(PBAudioSource other) {
 0221      if (ReferenceEquals(other, null)) {
 0222        return false;
 223      }
 0224      if (ReferenceEquals(other, this)) {
 0225        return true;
 226      }
 0227      if (Playing != other.Playing) return false;
 0228      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Volume, other.Volume)) return false;
 0229      if (Loop != other.Loop) return false;
 0230      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Pitch, other.Pitch)) return false;
 0231      if (AudioClipUrl != other.AudioClipUrl) return false;
 0232      return Equals(_unknownFields, other._unknownFields);
 233    }
 234
 235    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 236    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 237    public override int GetHashCode() {
 0238      int hash = 1;
 0239      if (HasPlaying) hash ^= Playing.GetHashCode();
 0240      if (HasVolume) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Volume);
 0241      if (HasLoop) hash ^= Loop.GetHashCode();
 0242      if (HasPitch) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Pitch);
 0243      if (AudioClipUrl.Length != 0) hash ^= AudioClipUrl.GetHashCode();
 0244      if (_unknownFields != null) {
 0245        hash ^= _unknownFields.GetHashCode();
 246      }
 0247      return hash;
 248    }
 249
 250    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 251    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 252    public override string ToString() {
 0253      return pb::JsonFormatter.ToDiagnosticString(this);
 254    }
 255
 256    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 257    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 258    public void WriteTo(pb::CodedOutputStream output) {
 259    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 260      output.WriteRawMessage(this);
 261    #else
 0262      if (HasPlaying) {
 0263        output.WriteRawTag(8);
 0264        output.WriteBool(Playing);
 265      }
 0266      if (HasVolume) {
 0267        output.WriteRawTag(21);
 0268        output.WriteFloat(Volume);
 269      }
 0270      if (HasLoop) {
 0271        output.WriteRawTag(24);
 0272        output.WriteBool(Loop);
 273      }
 0274      if (HasPitch) {
 0275        output.WriteRawTag(37);
 0276        output.WriteFloat(Pitch);
 277      }
 0278      if (AudioClipUrl.Length != 0) {
 0279        output.WriteRawTag(42);
 0280        output.WriteString(AudioClipUrl);
 281      }
 0282      if (_unknownFields != null) {
 0283        _unknownFields.WriteTo(output);
 284      }
 285    #endif
 0286    }
 287
 288    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 289    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 290    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 291    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 292      if (HasPlaying) {
 293        output.WriteRawTag(8);
 294        output.WriteBool(Playing);
 295      }
 296      if (HasVolume) {
 297        output.WriteRawTag(21);
 298        output.WriteFloat(Volume);
 299      }
 300      if (HasLoop) {
 301        output.WriteRawTag(24);
 302        output.WriteBool(Loop);
 303      }
 304      if (HasPitch) {
 305        output.WriteRawTag(37);
 306        output.WriteFloat(Pitch);
 307      }
 308      if (AudioClipUrl.Length != 0) {
 309        output.WriteRawTag(42);
 310        output.WriteString(AudioClipUrl);
 311      }
 312      if (_unknownFields != null) {
 313        _unknownFields.WriteTo(ref output);
 314      }
 315    }
 316    #endif
 317
 318    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 319    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 320    public int CalculateSize() {
 0321      int size = 0;
 0322      if (HasPlaying) {
 0323        size += 1 + 1;
 324      }
 0325      if (HasVolume) {
 0326        size += 1 + 4;
 327      }
 0328      if (HasLoop) {
 0329        size += 1 + 1;
 330      }
 0331      if (HasPitch) {
 0332        size += 1 + 4;
 333      }
 0334      if (AudioClipUrl.Length != 0) {
 0335        size += 1 + pb::CodedOutputStream.ComputeStringSize(AudioClipUrl);
 336      }
 0337      if (_unknownFields != null) {
 0338        size += _unknownFields.CalculateSize();
 339      }
 0340      return size;
 341    }
 342
 343    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 344    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 345    public void MergeFrom(PBAudioSource other) {
 0346      if (other == null) {
 0347        return;
 348      }
 0349      if (other.HasPlaying) {
 0350        Playing = other.Playing;
 351      }
 0352      if (other.HasVolume) {
 0353        Volume = other.Volume;
 354      }
 0355      if (other.HasLoop) {
 0356        Loop = other.Loop;
 357      }
 0358      if (other.HasPitch) {
 0359        Pitch = other.Pitch;
 360      }
 0361      if (other.AudioClipUrl.Length != 0) {
 0362        AudioClipUrl = other.AudioClipUrl;
 363      }
 0364      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0365    }
 366
 367    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 368    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 369    public void MergeFrom(pb::CodedInputStream input) {
 370    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 371      input.ReadRawMessage(this);
 372    #else
 373      uint tag;
 0374      while ((tag = input.ReadTag()) != 0) {
 375        switch(tag) {
 376          default:
 0377            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0378            break;
 379          case 8: {
 0380            Playing = input.ReadBool();
 0381            break;
 382          }
 383          case 21: {
 0384            Volume = input.ReadFloat();
 0385            break;
 386          }
 387          case 24: {
 0388            Loop = input.ReadBool();
 0389            break;
 390          }
 391          case 37: {
 0392            Pitch = input.ReadFloat();
 0393            break;
 394          }
 395          case 42: {
 0396            AudioClipUrl = input.ReadString();
 397            break;
 398          }
 399        }
 400      }
 401    #endif
 0402    }
 403
 404    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 405    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 406    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 407    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 408      uint tag;
 409      while ((tag = input.ReadTag()) != 0) {
 410        switch(tag) {
 411          default:
 412            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 413            break;
 414          case 8: {
 415            Playing = input.ReadBool();
 416            break;
 417          }
 418          case 21: {
 419            Volume = input.ReadFloat();
 420            break;
 421          }
 422          case 24: {
 423            Loop = input.ReadBool();
 424            break;
 425          }
 426          case 37: {
 427            Pitch = input.ReadFloat();
 428            break;
 429          }
 430          case 42: {
 431            AudioClipUrl = input.ReadString();
 432            break;
 433          }
 434        }
 435      }
 436    }
 437    #endif
 438
 439  }
 440
 441  #endregion
 442
 443}
 444
 445#endregion Designer generated code