< Summary

Class:DCL.ECSComponents.PBAudioSource
Assembly:DCL.Components.ProtobufData
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/PBFiles/AudioSource.cs
Covered lines:9
Uncovered lines:102
Coverable lines:111
Total lines:286
Line coverage:8.1% (9 of 111)
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%
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/PBFiles/AudioSource.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: 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 AudioSource.proto</summary>
 15  public static partial class AudioSourceReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for 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            "ChFBdWRpb1NvdXJjZS5wcm90bxIQZGVjZW50cmFsYW5kLmVjcyJlCg1QQkF1",
 28            "ZGlvU291cmNlEg8KB3BsYXlpbmcYASABKAgSDgoGdm9sdW1lGAIgASgCEgwK",
 29            "BGxvb3AYAyABKAgSDQoFcGl0Y2gYBCABKAISFgoOYXVkaW9fY2xpcF91cmwY",
 30            "BSABKAlCFKoCEURDTC5FQ1NDb21wb25lbnRzYgZwcm90bzM="));
 31      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 32          new pbr::FileDescriptor[] { },
 33          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 34            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBAudioSource), global::DCL.ECSComponents.PBA
 35          }));
 36    }
 37    #endregion
 38
 39  }
 40  #region Messages
 41  public sealed partial class PBAudioSource : pb::IMessage<PBAudioSource> {
 142    private static readonly pb::MessageParser<PBAudioSource> _parser = new pb::MessageParser<PBAudioSource>(() => new PB
 43    private pb::UnknownFieldSet _unknownFields;
 44    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 045    public static pb::MessageParser<PBAudioSource> Parser { get { return _parser; } }
 46
 47    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 48    public static pbr::MessageDescriptor Descriptor {
 049      get { return global::DCL.ECSComponents.AudioSourceReflection.Descriptor.MessageTypes[0]; }
 50    }
 51
 52    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 53    pbr::MessageDescriptor pb::IMessage.Descriptor {
 054      get { return Descriptor; }
 55    }
 56
 57    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 558    public PBAudioSource() {
 59      OnConstruction();
 560    }
 61
 62    partial void OnConstruction();
 63
 64    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 065    public PBAudioSource(PBAudioSource other) : this() {
 066      playing_ = other.playing_;
 067      volume_ = other.volume_;
 068      loop_ = other.loop_;
 069      pitch_ = other.pitch_;
 070      audioClipUrl_ = other.audioClipUrl_;
 071      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 072    }
 73
 74    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 75    public PBAudioSource Clone() {
 076      return new PBAudioSource(this);
 77    }
 78
 79    /// <summary>Field number for the "playing" field.</summary>
 80    public const int PlayingFieldNumber = 1;
 81    private bool playing_;
 82    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 83    public bool Playing {
 084      get { return playing_; }
 85      set {
 086        playing_ = value;
 087      }
 88    }
 89
 90    /// <summary>Field number for the "volume" field.</summary>
 91    public const int VolumeFieldNumber = 2;
 92    private float volume_;
 93    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 94    public float Volume {
 295      get { return volume_; }
 96      set {
 197        volume_ = value;
 198      }
 99    }
 100
 101    /// <summary>Field number for the "loop" field.</summary>
 102    public const int LoopFieldNumber = 3;
 103    private bool loop_;
 104    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 105    public bool Loop {
 0106      get { return loop_; }
 107      set {
 0108        loop_ = value;
 0109      }
 110    }
 111
 112    /// <summary>Field number for the "pitch" field.</summary>
 113    public const int PitchFieldNumber = 4;
 114    private float pitch_;
 115    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 116    public float Pitch {
 0117      get { return pitch_; }
 118      set {
 0119        pitch_ = value;
 0120      }
 121    }
 122
 123    /// <summary>Field number for the "audio_clip_url" field.</summary>
 124    public const int AudioClipUrlFieldNumber = 5;
 5125    private string audioClipUrl_ = "";
 126    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 127    public string AudioClipUrl {
 0128      get { return audioClipUrl_; }
 129      set {
 5130        audioClipUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 5131      }
 132    }
 133
 134    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 135    public override bool Equals(object other) {
 0136      return Equals(other as PBAudioSource);
 137    }
 138
 139    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 140    public bool Equals(PBAudioSource other) {
 0141      if (ReferenceEquals(other, null)) {
 0142        return false;
 143      }
 0144      if (ReferenceEquals(other, this)) {
 0145        return true;
 146      }
 0147      if (Playing != other.Playing) return false;
 0148      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Volume, other.Volume)) return false;
 0149      if (Loop != other.Loop) return false;
 0150      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Pitch, other.Pitch)) return false;
 0151      if (AudioClipUrl != other.AudioClipUrl) return false;
 0152      return Equals(_unknownFields, other._unknownFields);
 153    }
 154
 155    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 156    public override int GetHashCode() {
 0157      int hash = 1;
 0158      if (Playing != false) hash ^= Playing.GetHashCode();
 0159      if (Volume != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Volume);
 0160      if (Loop != false) hash ^= Loop.GetHashCode();
 0161      if (Pitch != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Pitch);
 0162      if (AudioClipUrl.Length != 0) hash ^= AudioClipUrl.GetHashCode();
 0163      if (_unknownFields != null) {
 0164        hash ^= _unknownFields.GetHashCode();
 165      }
 0166      return hash;
 167    }
 168
 169    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 170    public override string ToString() {
 0171      return pb::JsonFormatter.ToDiagnosticString(this);
 172    }
 173
 174    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 175    public void WriteTo(pb::CodedOutputStream output) {
 0176      if (Playing != false) {
 0177        output.WriteRawTag(8);
 0178        output.WriteBool(Playing);
 179      }
 0180      if (Volume != 0F) {
 0181        output.WriteRawTag(21);
 0182        output.WriteFloat(Volume);
 183      }
 0184      if (Loop != false) {
 0185        output.WriteRawTag(24);
 0186        output.WriteBool(Loop);
 187      }
 0188      if (Pitch != 0F) {
 0189        output.WriteRawTag(37);
 0190        output.WriteFloat(Pitch);
 191      }
 0192      if (AudioClipUrl.Length != 0) {
 0193        output.WriteRawTag(42);
 0194        output.WriteString(AudioClipUrl);
 195      }
 0196      if (_unknownFields != null) {
 0197        _unknownFields.WriteTo(output);
 198      }
 0199    }
 200
 201    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 202    public int CalculateSize() {
 0203      int size = 0;
 0204      if (Playing != false) {
 0205        size += 1 + 1;
 206      }
 0207      if (Volume != 0F) {
 0208        size += 1 + 4;
 209      }
 0210      if (Loop != false) {
 0211        size += 1 + 1;
 212      }
 0213      if (Pitch != 0F) {
 0214        size += 1 + 4;
 215      }
 0216      if (AudioClipUrl.Length != 0) {
 0217        size += 1 + pb::CodedOutputStream.ComputeStringSize(AudioClipUrl);
 218      }
 0219      if (_unknownFields != null) {
 0220        size += _unknownFields.CalculateSize();
 221      }
 0222      return size;
 223    }
 224
 225    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 226    public void MergeFrom(PBAudioSource other) {
 0227      if (other == null) {
 0228        return;
 229      }
 0230      if (other.Playing != false) {
 0231        Playing = other.Playing;
 232      }
 0233      if (other.Volume != 0F) {
 0234        Volume = other.Volume;
 235      }
 0236      if (other.Loop != false) {
 0237        Loop = other.Loop;
 238      }
 0239      if (other.Pitch != 0F) {
 0240        Pitch = other.Pitch;
 241      }
 0242      if (other.AudioClipUrl.Length != 0) {
 0243        AudioClipUrl = other.AudioClipUrl;
 244      }
 0245      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0246    }
 247
 248    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 249    public void MergeFrom(pb::CodedInputStream input) {
 250      uint tag;
 0251      while ((tag = input.ReadTag()) != 0) {
 252        switch(tag) {
 253          default:
 0254            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0255            break;
 256          case 8: {
 0257            Playing = input.ReadBool();
 0258            break;
 259          }
 260          case 21: {
 0261            Volume = input.ReadFloat();
 0262            break;
 263          }
 264          case 24: {
 0265            Loop = input.ReadBool();
 0266            break;
 267          }
 268          case 37: {
 0269            Pitch = input.ReadFloat();
 0270            break;
 271          }
 272          case 42: {
 0273            AudioClipUrl = input.ReadString();
 274            break;
 275          }
 276        }
 277      }
 0278    }
 279
 280  }
 281
 282  #endregion
 283
 284}
 285
 286#endregion Designer generated code