< Summary

Class:DCL.ECSComponents.PBAudioSource
Assembly:DCL.ECSComponents.ProtobufData
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/AudioSource.gen.cs
Covered lines:20
Uncovered lines:108
Coverable lines:128
Total lines:444
Line coverage:15.6% (20 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/DCLPlugins/ECS7/ProtocolBuffers/Generated/AudioSource.gen.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: ecs/components/AudioSource.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 ecs/components/AudioSource.proto</summary>
 15  public static partial class AudioSourceReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for ecs/components/AudioSource.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            "CiBlY3MvY29tcG9uZW50cy9BdWRpb1NvdXJjZS5wcm90bxIQZGVjZW50cmFs",
 28            "YW5kLmVjcyKjAQoNUEJBdWRpb1NvdXJjZRIUCgdwbGF5aW5nGAEgASgISACI",
 29            "AQESEwoGdm9sdW1lGAIgASgCSAGIAQESEQoEbG9vcBgDIAEoCEgCiAEBEhIK",
 30            "BXBpdGNoGAQgASgCSAOIAQESFgoOYXVkaW9fY2xpcF91cmwYBSABKAlCCgoI",
 31            "X3BsYXlpbmdCCQoHX3ZvbHVtZUIHCgVfbG9vcEIICgZfcGl0Y2hCFKoCEURD",
 32            "TC5FQ1NDb21wb25lbnRzYgZwcm90bzM="));
 33      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 34          new pbr::FileDescriptor[] { },
 35          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 36            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBAudioSource), global::DCL.ECSComponents.PBA
 37          }));
 38    }
 39    #endregion
 40
 41  }
 42  #region Messages
 43  public sealed partial class PBAudioSource : pb::IMessage<PBAudioSource>
 44  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 45      , pb::IBufferMessage
 46  #endif
 47  {
 148    private static readonly pb::MessageParser<PBAudioSource> _parser = new pb::MessageParser<PBAudioSource>(() => new PB
 49    private pb::UnknownFieldSet _unknownFields;
 50    private int _hasBits0;
 51    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 52    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 053    public static pb::MessageParser<PBAudioSource> Parser { get { return _parser; } }
 54
 55    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 56    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 57    public static pbr::MessageDescriptor Descriptor {
 058      get { return global::DCL.ECSComponents.AudioSourceReflection.Descriptor.MessageTypes[0]; }
 59    }
 60
 61    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 62    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 63    pbr::MessageDescriptor pb::IMessage.Descriptor {
 064      get { return Descriptor; }
 65    }
 66
 67    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 68    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 569    public PBAudioSource() {
 70      OnConstruction();
 571    }
 72
 73    partial void OnConstruction();
 74
 75    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 76    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 077    public PBAudioSource(PBAudioSource other) : this() {
 078      _hasBits0 = other._hasBits0;
 079      playing_ = other.playing_;
 080      volume_ = other.volume_;
 081      loop_ = other.loop_;
 082      pitch_ = other.pitch_;
 083      audioClipUrl_ = other.audioClipUrl_;
 084      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 085    }
 86
 87    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 88    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 89    public PBAudioSource Clone() {
 090      return new PBAudioSource(this);
 91    }
 92
 93    /// <summary>Field number for the "playing" field.</summary>
 94    public const int PlayingFieldNumber = 1;
 95    private bool playing_;
 96    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 97    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 98    public bool Playing {
 099      get { if ((_hasBits0 & 1) != 0) { return playing_; } else { return false; } }
 100      set {
 1101        _hasBits0 |= 1;
 1102        playing_ = value;
 1103      }
 104    }
 105    /// <summary>Gets whether the "playing" field is set</summary>
 106    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 107    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 108    public bool HasPlaying {
 0109      get { return (_hasBits0 & 1) != 0; }
 110    }
 111    /// <summary>Clears the value of the "playing" field</summary>
 112    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 113    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 114    public void ClearPlaying() {
 0115      _hasBits0 &= ~1;
 0116    }
 117
 118    /// <summary>Field number for the "volume" field.</summary>
 119    public const int VolumeFieldNumber = 2;
 120    private float volume_;
 121    /// <summary>
 122    /// default=1.0f
 123    /// </summary>
 124    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 125    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 126    public float Volume {
 20127      get { if ((_hasBits0 & 2) != 0) { return volume_; } else { return 0F; } }
 128      set {
 7129        _hasBits0 |= 2;
 7130        volume_ = value;
 7131      }
 132    }
 133    /// <summary>Gets whether the "volume" field is set</summary>
 134    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 135    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 136    public bool HasVolume {
 0137      get { return (_hasBits0 & 2) != 0; }
 138    }
 139    /// <summary>Clears the value of the "volume" field</summary>
 140    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 141    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 142    public void ClearVolume() {
 0143      _hasBits0 &= ~2;
 0144    }
 145
 146    /// <summary>Field number for the "loop" field.</summary>
 147    public const int LoopFieldNumber = 3;
 148    private bool loop_;
 149    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 150    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 151    public bool Loop {
 0152      get { if ((_hasBits0 & 4) != 0) { return loop_; } else { return false; } }
 153      set {
 3154        _hasBits0 |= 4;
 3155        loop_ = value;
 3156      }
 157    }
 158    /// <summary>Gets whether the "loop" field is set</summary>
 159    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 160    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 161    public bool HasLoop {
 0162      get { return (_hasBits0 & 4) != 0; }
 163    }
 164    /// <summary>Clears the value of the "loop" field</summary>
 165    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 166    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 167    public void ClearLoop() {
 0168      _hasBits0 &= ~4;
 0169    }
 170
 171    /// <summary>Field number for the "pitch" field.</summary>
 172    public const int PitchFieldNumber = 4;
 173    private float pitch_;
 174    /// <summary>
 175    /// default=1.0f
 176    /// </summary>
 177    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 178    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 179    public float Pitch {
 6180      get { if ((_hasBits0 & 8) != 0) { return pitch_; } else { return 0F; } }
 181      set {
 2182        _hasBits0 |= 8;
 2183        pitch_ = value;
 2184      }
 185    }
 186    /// <summary>Gets whether the "pitch" field is set</summary>
 187    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 188    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 189    public bool HasPitch {
 0190      get { return (_hasBits0 & 8) != 0; }
 191    }
 192    /// <summary>Clears the value of the "pitch" field</summary>
 193    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 194    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 195    public void ClearPitch() {
 0196      _hasBits0 &= ~8;
 0197    }
 198
 199    /// <summary>Field number for the "audio_clip_url" field.</summary>
 200    public const int AudioClipUrlFieldNumber = 5;
 5201    private string audioClipUrl_ = "";
 202    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 203    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 204    public string AudioClipUrl {
 0205      get { return audioClipUrl_; }
 206      set {
 5207        audioClipUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 5208      }
 209    }
 210
 211    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 212    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 213    public override bool Equals(object other) {
 0214      return Equals(other as PBAudioSource);
 215    }
 216
 217    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 218    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 219    public bool Equals(PBAudioSource other) {
 0220      if (ReferenceEquals(other, null)) {
 0221        return false;
 222      }
 0223      if (ReferenceEquals(other, this)) {
 0224        return true;
 225      }
 0226      if (Playing != other.Playing) return false;
 0227      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Volume, other.Volume)) return false;
 0228      if (Loop != other.Loop) return false;
 0229      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Pitch, other.Pitch)) return false;
 0230      if (AudioClipUrl != other.AudioClipUrl) return false;
 0231      return Equals(_unknownFields, other._unknownFields);
 232    }
 233
 234    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 235    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 236    public override int GetHashCode() {
 0237      int hash = 1;
 0238      if (HasPlaying) hash ^= Playing.GetHashCode();
 0239      if (HasVolume) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Volume);
 0240      if (HasLoop) hash ^= Loop.GetHashCode();
 0241      if (HasPitch) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Pitch);
 0242      if (AudioClipUrl.Length != 0) hash ^= AudioClipUrl.GetHashCode();
 0243      if (_unknownFields != null) {
 0244        hash ^= _unknownFields.GetHashCode();
 245      }
 0246      return hash;
 247    }
 248
 249    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 250    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 251    public override string ToString() {
 0252      return pb::JsonFormatter.ToDiagnosticString(this);
 253    }
 254
 255    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 256    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 257    public void WriteTo(pb::CodedOutputStream output) {
 258    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 259      output.WriteRawMessage(this);
 260    #else
 0261      if (HasPlaying) {
 0262        output.WriteRawTag(8);
 0263        output.WriteBool(Playing);
 264      }
 0265      if (HasVolume) {
 0266        output.WriteRawTag(21);
 0267        output.WriteFloat(Volume);
 268      }
 0269      if (HasLoop) {
 0270        output.WriteRawTag(24);
 0271        output.WriteBool(Loop);
 272      }
 0273      if (HasPitch) {
 0274        output.WriteRawTag(37);
 0275        output.WriteFloat(Pitch);
 276      }
 0277      if (AudioClipUrl.Length != 0) {
 0278        output.WriteRawTag(42);
 0279        output.WriteString(AudioClipUrl);
 280      }
 0281      if (_unknownFields != null) {
 0282        _unknownFields.WriteTo(output);
 283      }
 284    #endif
 0285    }
 286
 287    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 288    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 289    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 290    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 291      if (HasPlaying) {
 292        output.WriteRawTag(8);
 293        output.WriteBool(Playing);
 294      }
 295      if (HasVolume) {
 296        output.WriteRawTag(21);
 297        output.WriteFloat(Volume);
 298      }
 299      if (HasLoop) {
 300        output.WriteRawTag(24);
 301        output.WriteBool(Loop);
 302      }
 303      if (HasPitch) {
 304        output.WriteRawTag(37);
 305        output.WriteFloat(Pitch);
 306      }
 307      if (AudioClipUrl.Length != 0) {
 308        output.WriteRawTag(42);
 309        output.WriteString(AudioClipUrl);
 310      }
 311      if (_unknownFields != null) {
 312        _unknownFields.WriteTo(ref output);
 313      }
 314    }
 315    #endif
 316
 317    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 318    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 319    public int CalculateSize() {
 0320      int size = 0;
 0321      if (HasPlaying) {
 0322        size += 1 + 1;
 323      }
 0324      if (HasVolume) {
 0325        size += 1 + 4;
 326      }
 0327      if (HasLoop) {
 0328        size += 1 + 1;
 329      }
 0330      if (HasPitch) {
 0331        size += 1 + 4;
 332      }
 0333      if (AudioClipUrl.Length != 0) {
 0334        size += 1 + pb::CodedOutputStream.ComputeStringSize(AudioClipUrl);
 335      }
 0336      if (_unknownFields != null) {
 0337        size += _unknownFields.CalculateSize();
 338      }
 0339      return size;
 340    }
 341
 342    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 343    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 344    public void MergeFrom(PBAudioSource other) {
 0345      if (other == null) {
 0346        return;
 347      }
 0348      if (other.HasPlaying) {
 0349        Playing = other.Playing;
 350      }
 0351      if (other.HasVolume) {
 0352        Volume = other.Volume;
 353      }
 0354      if (other.HasLoop) {
 0355        Loop = other.Loop;
 356      }
 0357      if (other.HasPitch) {
 0358        Pitch = other.Pitch;
 359      }
 0360      if (other.AudioClipUrl.Length != 0) {
 0361        AudioClipUrl = other.AudioClipUrl;
 362      }
 0363      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0364    }
 365
 366    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 367    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 368    public void MergeFrom(pb::CodedInputStream input) {
 369    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 370      input.ReadRawMessage(this);
 371    #else
 372      uint tag;
 0373      while ((tag = input.ReadTag()) != 0) {
 374        switch(tag) {
 375          default:
 0376            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0377            break;
 378          case 8: {
 0379            Playing = input.ReadBool();
 0380            break;
 381          }
 382          case 21: {
 0383            Volume = input.ReadFloat();
 0384            break;
 385          }
 386          case 24: {
 0387            Loop = input.ReadBool();
 0388            break;
 389          }
 390          case 37: {
 0391            Pitch = input.ReadFloat();
 0392            break;
 393          }
 394          case 42: {
 0395            AudioClipUrl = input.ReadString();
 396            break;
 397          }
 398        }
 399      }
 400    #endif
 0401    }
 402
 403    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 404    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 405    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 406    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 407      uint tag;
 408      while ((tag = input.ReadTag()) != 0) {
 409        switch(tag) {
 410          default:
 411            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 412            break;
 413          case 8: {
 414            Playing = input.ReadBool();
 415            break;
 416          }
 417          case 21: {
 418            Volume = input.ReadFloat();
 419            break;
 420          }
 421          case 24: {
 422            Loop = input.ReadBool();
 423            break;
 424          }
 425          case 37: {
 426            Pitch = input.ReadFloat();
 427            break;
 428          }
 429          case 42: {
 430            AudioClipUrl = input.ReadString();
 431            break;
 432          }
 433        }
 434      }
 435    }
 436    #endif
 437
 438  }
 439
 440  #endregion
 441
 442}
 443
 444#endregion Designer generated code