< Summary

Class:DCL.ECSComponents.PBCameraModeArea
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/CameraModeArea.gen.cs
Covered lines:28
Uncovered lines:41
Coverable lines:69
Total lines:303
Line coverage:40.5% (28 of 69)
Covered branches:0
Total branches:0
Covered methods:10
Total methods:19
Method coverage:52.6% (10 of 19)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBCameraModeArea()0%110100%
get_Descriptor()0%2100%
PBCameraModeArea()0%110100%
PBCameraModeArea(...)0%12300%
Clone()0%2100%
Equals(...)0%2100%
Equals(...)0%30500%
GetHashCode()0%20400%
ToString()0%2100%
WriteTo(...)0%4.594066.67%
CalculateSize()0%4.254075%
MergeFrom(...)0%30500%
MergeFrom(...)0%5.935066.67%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/camera_mode_area.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/camera_mode_area.proto</summ
 15  public static partial class CameraModeAreaReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/camera_mode_area.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static CameraModeAreaReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "CjJkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvY2FtZXJhX21vZGVfYXJl",
 28            "YS5wcm90bxIbZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzGiFkZWNlbnRy",
 29            "YWxhbmQvY29tbW9uL3ZlY3RvcnMucHJvdG8aNGRlY2VudHJhbGFuZC9zZGsv",
 30            "Y29tcG9uZW50cy9jb21tb24vY2FtZXJhX3R5cGUucHJvdG8ifAoQUEJDYW1l",
 31            "cmFNb2RlQXJlYRIqCgRhcmVhGAEgASgLMhwuZGVjZW50cmFsYW5kLmNvbW1v",
 32            "bi5WZWN0b3IzEjwKBG1vZGUYAiABKA4yLi5kZWNlbnRyYWxhbmQuc2RrLmNv",
 33            "bXBvbmVudHMuY29tbW9uLkNhbWVyYVR5cGVCFKoCEURDTC5FQ1NDb21wb25l",
 34            "bnRzYgZwcm90bzM="));
 35      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 36          new pbr::FileDescriptor[] { global::Decentraland.Common.VectorsReflection.Descriptor, global::DCL.ECSComponent
 37          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 38            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBCameraModeArea), global::DCL.ECSComponents.
 39          }));
 40    }
 41    #endregion
 42
 43  }
 44  #region Messages
 45  /// <summary>
 46  /// The CameraModeArea component can be attached to an Entity to define a region of space where
 47  /// the player's camera mode (1st-person or 3rd-person) is overridden.
 48  ///
 49  /// The Entity's Transform position determines the center-point of the region, while its size is
 50  /// given as a vector in the `area` property below. The Transform rotation is applied, but the scale
 51  /// is ignored.
 52  ///
 53  /// When players leave the region, their previous setting is restored.
 54  ///
 55  /// Note that, while commonly used to delineate a 2D area in a scene (hence the name), the region
 56  /// is actually a 3D volume.
 57  /// </summary>
 58  public sealed partial class PBCameraModeArea : pb::IMessage<PBCameraModeArea>
 59  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 60      , pb::IBufferMessage
 61  #endif
 62  {
 263    private static readonly pb::MessageParser<PBCameraModeArea> _parser = new pb::MessageParser<PBCameraModeArea>(() => 
 64    private pb::UnknownFieldSet _unknownFields;
 65    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 66    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 167    public static pb::MessageParser<PBCameraModeArea> Parser { get { return _parser; } }
 68
 69    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 70    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 71    public static pbr::MessageDescriptor Descriptor {
 072      get { return global::DCL.ECSComponents.CameraModeAreaReflection.Descriptor.MessageTypes[0]; }
 73    }
 74
 75    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 76    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 77    pbr::MessageDescriptor pb::IMessage.Descriptor {
 078      get { return Descriptor; }
 79    }
 80
 81    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 82    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 783    public PBCameraModeArea() {
 84      OnConstruction();
 785    }
 86
 87    partial void OnConstruction();
 88
 89    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 90    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 091    public PBCameraModeArea(PBCameraModeArea other) : this() {
 092      area_ = other.area_ != null ? other.area_.Clone() : null;
 093      mode_ = other.mode_;
 094      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 095    }
 96
 97    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 98    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 99    public PBCameraModeArea Clone() {
 0100      return new PBCameraModeArea(this);
 101    }
 102
 103    /// <summary>Field number for the "area" field.</summary>
 104    public const int AreaFieldNumber = 1;
 105    private global::Decentraland.Common.Vector3 area_;
 106    /// <summary>
 107    /// the 3D size of the region
 108    /// </summary>
 109    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 110    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 111    public global::Decentraland.Common.Vector3 Area {
 27112      get { return area_; }
 113      set {
 7114        area_ = value;
 7115      }
 116    }
 117
 118    /// <summary>Field number for the "mode" field.</summary>
 119    public const int ModeFieldNumber = 2;
 120    private global::DCL.ECSComponents.CameraType mode_ = global::DCL.ECSComponents.CameraType.CtFirstPerson;
 121    /// <summary>
 122    /// the camera mode to enforce
 123    /// </summary>
 124    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 125    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 126    public global::DCL.ECSComponents.CameraType Mode {
 12127      get { return mode_; }
 128      set {
 7129        mode_ = value;
 7130      }
 131    }
 132
 133    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 134    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 135    public override bool Equals(object other) {
 0136      return Equals(other as PBCameraModeArea);
 137    }
 138
 139    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 140    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 141    public bool Equals(PBCameraModeArea other) {
 0142      if (ReferenceEquals(other, null)) {
 0143        return false;
 144      }
 0145      if (ReferenceEquals(other, this)) {
 0146        return true;
 147      }
 0148      if (!object.Equals(Area, other.Area)) return false;
 0149      if (Mode != other.Mode) return false;
 0150      return Equals(_unknownFields, other._unknownFields);
 151    }
 152
 153    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 154    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 155    public override int GetHashCode() {
 0156      int hash = 1;
 0157      if (area_ != null) hash ^= Area.GetHashCode();
 0158      if (Mode != global::DCL.ECSComponents.CameraType.CtFirstPerson) hash ^= Mode.GetHashCode();
 0159      if (_unknownFields != null) {
 0160        hash ^= _unknownFields.GetHashCode();
 161      }
 0162      return hash;
 163    }
 164
 165    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 166    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 167    public override string ToString() {
 0168      return pb::JsonFormatter.ToDiagnosticString(this);
 169    }
 170
 171    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 172    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 173    public void WriteTo(pb::CodedOutputStream output) {
 174    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 175      output.WriteRawMessage(this);
 176    #else
 1177      if (area_ != null) {
 1178        output.WriteRawTag(10);
 1179        output.WriteMessage(Area);
 180      }
 1181      if (Mode != global::DCL.ECSComponents.CameraType.CtFirstPerson) {
 0182        output.WriteRawTag(16);
 0183        output.WriteEnum((int) Mode);
 184      }
 1185      if (_unknownFields != null) {
 0186        _unknownFields.WriteTo(output);
 187      }
 188    #endif
 1189    }
 190
 191    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 192    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 193    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 194    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 195      if (area_ != null) {
 196        output.WriteRawTag(10);
 197        output.WriteMessage(Area);
 198      }
 199      if (Mode != global::DCL.ECSComponents.CameraType.CtFirstPerson) {
 200        output.WriteRawTag(16);
 201        output.WriteEnum((int) Mode);
 202      }
 203      if (_unknownFields != null) {
 204        _unknownFields.WriteTo(ref output);
 205      }
 206    }
 207    #endif
 208
 209    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 210    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 211    public int CalculateSize() {
 1212      int size = 0;
 1213      if (area_ != null) {
 1214        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Area);
 215      }
 1216      if (Mode != global::DCL.ECSComponents.CameraType.CtFirstPerson) {
 0217        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode);
 218      }
 1219      if (_unknownFields != null) {
 0220        size += _unknownFields.CalculateSize();
 221      }
 1222      return size;
 223    }
 224
 225    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 226    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 227    public void MergeFrom(PBCameraModeArea other) {
 0228      if (other == null) {
 0229        return;
 230      }
 0231      if (other.area_ != null) {
 0232        if (area_ == null) {
 0233          Area = new global::Decentraland.Common.Vector3();
 234        }
 0235        Area.MergeFrom(other.Area);
 236      }
 0237      if (other.Mode != global::DCL.ECSComponents.CameraType.CtFirstPerson) {
 0238        Mode = other.Mode;
 239      }
 0240      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0241    }
 242
 243    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 244    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 245    public void MergeFrom(pb::CodedInputStream input) {
 246    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 247      input.ReadRawMessage(this);
 248    #else
 249      uint tag;
 2250      while ((tag = input.ReadTag()) != 0) {
 251        switch(tag) {
 252          default:
 0253            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0254            break;
 255          case 10: {
 1256            if (area_ == null) {
 1257              Area = new global::Decentraland.Common.Vector3();
 258            }
 1259            input.ReadMessage(Area);
 1260            break;
 261          }
 262          case 16: {
 0263            Mode = (global::DCL.ECSComponents.CameraType) input.ReadEnum();
 264            break;
 265          }
 266        }
 267      }
 268    #endif
 1269    }
 270
 271    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 272    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 273    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 274    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 275      uint tag;
 276      while ((tag = input.ReadTag()) != 0) {
 277        switch(tag) {
 278          default:
 279            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 280            break;
 281          case 10: {
 282            if (area_ == null) {
 283              Area = new global::Decentraland.Common.Vector3();
 284            }
 285            input.ReadMessage(Area);
 286            break;
 287          }
 288          case 16: {
 289            Mode = (global::DCL.ECSComponents.CameraType) input.ReadEnum();
 290            break;
 291          }
 292        }
 293      }
 294    }
 295    #endif
 296
 297  }
 298
 299  #endregion
 300
 301}
 302
 303#endregion Designer generated code