< Summary

Class:DCL.ECSComponents.PBUiCanvasInformation
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/UiCanvasInformation.gen.cs
Covered lines:13
Uncovered lines:86
Coverable lines:99
Total lines:376
Line coverage:13.1% (13 of 99)
Covered branches:0
Total branches:0
Covered methods:8
Total methods:23
Method coverage:34.7% (8 of 23)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBUiCanvasInformation()0%110100%
get_Descriptor()0%2100%
PBUiCanvasInformation()0%110100%
PBUiCanvasInformation(...)0%12300%
Clone()0%2100%
Equals(...)0%2100%
Equals(...)0%56700%
GetHashCode()0%42600%
ToString()0%2100%
WriteTo(...)0%42600%
CalculateSize()0%42600%
MergeFrom(...)0%56700%
MergeFrom(...)0%72800%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/ui_canvas_information.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/ui_canvas_information.proto<
 15  public static partial class UiCanvasInformationReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/ui_canvas_information.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static UiCanvasInformationReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "CjdkZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdWlfY2FudmFzX2luZm9y",
 28            "bWF0aW9uLnByb3RvEhtkZWNlbnRyYWxhbmQuc2RrLmNvbXBvbmVudHMaJWRl",
 29            "Y2VudHJhbGFuZC9jb21tb24vYm9yZGVyX3JlY3QucHJvdG8ijgEKFVBCVWlD",
 30            "YW52YXNJbmZvcm1hdGlvbhIaChJkZXZpY2VfcGl4ZWxfcmF0aW8YASABKAIS",
 31            "DQoFd2lkdGgYAiABKAUSDgoGaGVpZ2h0GAMgASgFEjoKEWludGVyYWN0YWJs",
 32            "ZV9hcmVhGAQgASgLMh8uZGVjZW50cmFsYW5kLmNvbW1vbi5Cb3JkZXJSZWN0",
 33            "QhSqAhFEQ0wuRUNTQ29tcG9uZW50c2IGcHJvdG8z"));
 34      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 35          new pbr::FileDescriptor[] { global::Decentraland.Common.BorderRectReflection.Descriptor, },
 36          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 37            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBUiCanvasInformation), global::DCL.ECSCompon
 38          }));
 39    }
 40    #endregion
 41
 42  }
 43  #region Messages
 44  /// <summary>
 45  /// This component is created by the renderer and used by the scenes to know the resolution of the UI canvas
 46  /// </summary>
 47  public sealed partial class PBUiCanvasInformation : pb::IMessage<PBUiCanvasInformation>
 48  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 49      , pb::IBufferMessage
 50  #endif
 51  {
 152    private static readonly pb::MessageParser<PBUiCanvasInformation> _parser = new pb::MessageParser<PBUiCanvasInformati
 53    private pb::UnknownFieldSet _unknownFields;
 54    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 55    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 056    public static pb::MessageParser<PBUiCanvasInformation> Parser { get { return _parser; } }
 57
 58    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 59    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 60    public static pbr::MessageDescriptor Descriptor {
 061      get { return global::DCL.ECSComponents.UiCanvasInformationReflection.Descriptor.MessageTypes[0]; }
 62    }
 63
 64    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 65    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 66    pbr::MessageDescriptor pb::IMessage.Descriptor {
 067      get { return Descriptor; }
 68    }
 69
 70    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 71    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 372    public PBUiCanvasInformation() {
 73      OnConstruction();
 374    }
 75
 76    partial void OnConstruction();
 77
 78    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 79    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 080    public PBUiCanvasInformation(PBUiCanvasInformation other) : this() {
 081      devicePixelRatio_ = other.devicePixelRatio_;
 082      width_ = other.width_;
 083      height_ = other.height_;
 084      interactableArea_ = other.interactableArea_ != null ? other.interactableArea_.Clone() : null;
 085      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 086    }
 87
 88    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 89    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 90    public PBUiCanvasInformation Clone() {
 091      return new PBUiCanvasInformation(this);
 92    }
 93
 94    /// <summary>Field number for the "device_pixel_ratio" field.</summary>
 95    public const int DevicePixelRatioFieldNumber = 1;
 96    private float devicePixelRatio_;
 97    /// <summary>
 98    /// informs the scene about the resolution used for the UI rendering
 99    /// </summary>
 100    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 101    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 102    public float DevicePixelRatio {
 0103      get { return devicePixelRatio_; }
 104      set {
 3105        devicePixelRatio_ = value;
 3106      }
 107    }
 108
 109    /// <summary>Field number for the "width" field.</summary>
 110    public const int WidthFieldNumber = 2;
 111    private int width_;
 112    /// <summary>
 113    /// informs about the width of the canvas, in virtual pixels. this value does not change when the pixel ratio change
 114    /// </summary>
 115    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 116    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 117    public int Width {
 3118      get { return width_; }
 119      set {
 3120        width_ = value;
 3121      }
 122    }
 123
 124    /// <summary>Field number for the "height" field.</summary>
 125    public const int HeightFieldNumber = 3;
 126    private int height_;
 127    /// <summary>
 128    /// informs about the height of the canvas, in virtual pixels. this value does not change when the pixel ratio chang
 129    /// </summary>
 130    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 131    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 132    public int Height {
 3133      get { return height_; }
 134      set {
 3135        height_ = value;
 3136      }
 137    }
 138
 139    /// <summary>Field number for the "interactable_area" field.</summary>
 140    public const int InteractableAreaFieldNumber = 4;
 141    private global::Decentraland.Common.BorderRect interactableArea_;
 142    /// <summary>
 143    /// informs the sdk about the interactable area. some implementations may change
 144    /// this area depending on the HUD that is being shown. this value may change at
 145    /// any time by the Renderer to create reactive UIs. as an example, an explorer with the
 146    /// chat UI hidden and with no minimap could have a rect that covers the whole screen.
 147    /// on the contrary, if the chat UI is shown, the rect would be smaller.
 148    /// </summary>
 149    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 150    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 151    public global::Decentraland.Common.BorderRect InteractableArea {
 0152      get { return interactableArea_; }
 153      set {
 3154        interactableArea_ = value;
 3155      }
 156    }
 157
 158    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 159    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 160    public override bool Equals(object other) {
 0161      return Equals(other as PBUiCanvasInformation);
 162    }
 163
 164    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 165    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 166    public bool Equals(PBUiCanvasInformation other) {
 0167      if (ReferenceEquals(other, null)) {
 0168        return false;
 169      }
 0170      if (ReferenceEquals(other, this)) {
 0171        return true;
 172      }
 0173      if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DevicePixelRatio, other.DevicePixelRatio)
 0174      if (Width != other.Width) return false;
 0175      if (Height != other.Height) return false;
 0176      if (!object.Equals(InteractableArea, other.InteractableArea)) return false;
 0177      return Equals(_unknownFields, other._unknownFields);
 178    }
 179
 180    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 181    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 182    public override int GetHashCode() {
 0183      int hash = 1;
 0184      if (DevicePixelRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Devic
 0185      if (Width != 0) hash ^= Width.GetHashCode();
 0186      if (Height != 0) hash ^= Height.GetHashCode();
 0187      if (interactableArea_ != null) hash ^= InteractableArea.GetHashCode();
 0188      if (_unknownFields != null) {
 0189        hash ^= _unknownFields.GetHashCode();
 190      }
 0191      return hash;
 192    }
 193
 194    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 195    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 196    public override string ToString() {
 0197      return pb::JsonFormatter.ToDiagnosticString(this);
 198    }
 199
 200    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 201    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 202    public void WriteTo(pb::CodedOutputStream output) {
 203    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 204      output.WriteRawMessage(this);
 205    #else
 0206      if (DevicePixelRatio != 0F) {
 0207        output.WriteRawTag(13);
 0208        output.WriteFloat(DevicePixelRatio);
 209      }
 0210      if (Width != 0) {
 0211        output.WriteRawTag(16);
 0212        output.WriteInt32(Width);
 213      }
 0214      if (Height != 0) {
 0215        output.WriteRawTag(24);
 0216        output.WriteInt32(Height);
 217      }
 0218      if (interactableArea_ != null) {
 0219        output.WriteRawTag(34);
 0220        output.WriteMessage(InteractableArea);
 221      }
 0222      if (_unknownFields != null) {
 0223        _unknownFields.WriteTo(output);
 224      }
 225    #endif
 0226    }
 227
 228    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 229    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 230    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 231    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 232      if (DevicePixelRatio != 0F) {
 233        output.WriteRawTag(13);
 234        output.WriteFloat(DevicePixelRatio);
 235      }
 236      if (Width != 0) {
 237        output.WriteRawTag(16);
 238        output.WriteInt32(Width);
 239      }
 240      if (Height != 0) {
 241        output.WriteRawTag(24);
 242        output.WriteInt32(Height);
 243      }
 244      if (interactableArea_ != null) {
 245        output.WriteRawTag(34);
 246        output.WriteMessage(InteractableArea);
 247      }
 248      if (_unknownFields != null) {
 249        _unknownFields.WriteTo(ref output);
 250      }
 251    }
 252    #endif
 253
 254    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 255    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 256    public int CalculateSize() {
 0257      int size = 0;
 0258      if (DevicePixelRatio != 0F) {
 0259        size += 1 + 4;
 260      }
 0261      if (Width != 0) {
 0262        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Width);
 263      }
 0264      if (Height != 0) {
 0265        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Height);
 266      }
 0267      if (interactableArea_ != null) {
 0268        size += 1 + pb::CodedOutputStream.ComputeMessageSize(InteractableArea);
 269      }
 0270      if (_unknownFields != null) {
 0271        size += _unknownFields.CalculateSize();
 272      }
 0273      return size;
 274    }
 275
 276    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 277    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 278    public void MergeFrom(PBUiCanvasInformation other) {
 0279      if (other == null) {
 0280        return;
 281      }
 0282      if (other.DevicePixelRatio != 0F) {
 0283        DevicePixelRatio = other.DevicePixelRatio;
 284      }
 0285      if (other.Width != 0) {
 0286        Width = other.Width;
 287      }
 0288      if (other.Height != 0) {
 0289        Height = other.Height;
 290      }
 0291      if (other.interactableArea_ != null) {
 0292        if (interactableArea_ == null) {
 0293          InteractableArea = new global::Decentraland.Common.BorderRect();
 294        }
 0295        InteractableArea.MergeFrom(other.InteractableArea);
 296      }
 0297      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0298    }
 299
 300    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 301    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 302    public void MergeFrom(pb::CodedInputStream input) {
 303    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 304      input.ReadRawMessage(this);
 305    #else
 306      uint tag;
 0307      while ((tag = input.ReadTag()) != 0) {
 308        switch(tag) {
 309          default:
 0310            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0311            break;
 312          case 13: {
 0313            DevicePixelRatio = input.ReadFloat();
 0314            break;
 315          }
 316          case 16: {
 0317            Width = input.ReadInt32();
 0318            break;
 319          }
 320          case 24: {
 0321            Height = input.ReadInt32();
 0322            break;
 323          }
 324          case 34: {
 0325            if (interactableArea_ == null) {
 0326              InteractableArea = new global::Decentraland.Common.BorderRect();
 327            }
 0328            input.ReadMessage(InteractableArea);
 329            break;
 330          }
 331        }
 332      }
 333    #endif
 0334    }
 335
 336    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 337    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 338    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 339    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 340      uint tag;
 341      while ((tag = input.ReadTag()) != 0) {
 342        switch(tag) {
 343          default:
 344            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 345            break;
 346          case 13: {
 347            DevicePixelRatio = input.ReadFloat();
 348            break;
 349          }
 350          case 16: {
 351            Width = input.ReadInt32();
 352            break;
 353          }
 354          case 24: {
 355            Height = input.ReadInt32();
 356            break;
 357          }
 358          case 34: {
 359            if (interactableArea_ == null) {
 360              InteractableArea = new global::Decentraland.Common.BorderRect();
 361            }
 362            input.ReadMessage(InteractableArea);
 363            break;
 364          }
 365        }
 366      }
 367    }
 368    #endif
 369
 370  }
 371
 372  #endregion
 373
 374}
 375
 376#endregion Designer generated code