< Summary

Class:DCL.ECSComponents.UiBackgroundReflection
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/UiBackground.gen.cs
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:443
Line coverage:0% (0 of 4)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
UiBackgroundReflection()0%2100%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/sdk/components/ui_background.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_background.proto</summary
 15  public static partial class UiBackgroundReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/sdk/components/ui_background.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 020      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static UiBackgroundReflection() {
 025      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "Ci9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdWlfYmFja2dyb3VuZC5w",
 28            "cm90bxIbZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzGiBkZWNlbnRyYWxh",
 29            "bmQvY29tbW9uL2NvbG9ycy5wcm90bxohZGVjZW50cmFsYW5kL2NvbW1vbi90",
 30            "ZXh0dXJlLnByb3RvGiVkZWNlbnRyYWxhbmQvY29tbW9uL2JvcmRlcl9yZWN0",
 31            "LnByb3RvIrgCCg5QQlVpQmFja2dyb3VuZBIvCgVjb2xvchgBIAEoCzIbLmRl",
 32            "Y2VudHJhbGFuZC5jb21tb24uQ29sb3I0SACIAQESNwoHdGV4dHVyZRgCIAEo",
 33            "CzIhLmRlY2VudHJhbGFuZC5jb21tb24uVGV4dHVyZVVuaW9uSAGIAQESSAoM",
 34            "dGV4dHVyZV9tb2RlGAMgASgOMjIuZGVjZW50cmFsYW5kLnNkay5jb21wb25l",
 35            "bnRzLkJhY2tncm91bmRUZXh0dXJlTW9kZRI8Cg50ZXh0dXJlX3NsaWNlcxgE",
 36            "IAEoCzIfLmRlY2VudHJhbGFuZC5jb21tb24uQm9yZGVyUmVjdEgCiAEBEgsK",
 37            "A3V2cxgFIAMoAkIICgZfY29sb3JCCgoIX3RleHR1cmVCEQoPX3RleHR1cmVf",
 38            "c2xpY2VzKkEKFUJhY2tncm91bmRUZXh0dXJlTW9kZRIPCgtOSU5FX1NMSUNF",
 39            "UxAAEgoKBkNFTlRFUhABEgsKB1NUUkVUQ0gQAkIUqgIRRENMLkVDU0NvbXBv",
 40            "bmVudHNiBnByb3RvMw=="));
 041      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 42          new pbr::FileDescriptor[] { global::Decentraland.Common.ColorsReflection.Descriptor, global::Decentraland.Comm
 43          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::DCL.ECSComponents.BackgroundTextureMode), }, null, new pbr
 44            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBUiBackground), global::DCL.ECSComponents.PB
 45          }));
 046    }
 47    #endregion
 48
 49  }
 50  #region Enums
 51  public enum BackgroundTextureMode {
 52    /// <summary>
 53    /// https://docs.unity3d.com/Manual/UIE-USS-SupportedProperties.html (Slicing section)
 54    /// https://forum.unity.com/threads/how-does-slicing-in-ui-tookkit-works.1235863/
 55    /// https://docs.unity3d.com/Manual/9SliceSprites.html
 56    /// https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice
 57    /// </summary>
 58    [pbr::OriginalName("NINE_SLICES")] NineSlices = 0,
 59    /// <summary>
 60    /// CENTER enables the texture to be rendered centered in relation to the
 61    /// element. If the element is smaller than the texture then the background
 62    /// should use the element as stencil to cut off the out-of-bounds area
 63    /// </summary>
 64    [pbr::OriginalName("CENTER")] Center = 1,
 65    /// <summary>
 66    /// STRETCH enables the texture to cover all the area of the container,
 67    /// adopting its aspect ratio.
 68    /// </summary>
 69    [pbr::OriginalName("STRETCH")] Stretch = 2,
 70  }
 71
 72  #endregion
 73
 74  #region Messages
 75  public sealed partial class PBUiBackground : pb::IMessage<PBUiBackground>
 76  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 77      , pb::IBufferMessage
 78  #endif
 79  {
 80    private static readonly pb::MessageParser<PBUiBackground> _parser = new pb::MessageParser<PBUiBackground>(() => new 
 81    private pb::UnknownFieldSet _unknownFields;
 82    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 83    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 84    public static pb::MessageParser<PBUiBackground> Parser { get { return _parser; } }
 85
 86    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 87    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 88    public static pbr::MessageDescriptor Descriptor {
 89      get { return global::DCL.ECSComponents.UiBackgroundReflection.Descriptor.MessageTypes[0]; }
 90    }
 91
 92    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 93    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 94    pbr::MessageDescriptor pb::IMessage.Descriptor {
 95      get { return Descriptor; }
 96    }
 97
 98    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 99    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 100    public PBUiBackground() {
 101      OnConstruction();
 102    }
 103
 104    partial void OnConstruction();
 105
 106    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 107    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 108    public PBUiBackground(PBUiBackground other) : this() {
 109      color_ = other.color_ != null ? other.color_.Clone() : null;
 110      texture_ = other.texture_ != null ? other.texture_.Clone() : null;
 111      textureMode_ = other.textureMode_;
 112      textureSlices_ = other.textureSlices_ != null ? other.textureSlices_.Clone() : null;
 113      uvs_ = other.uvs_.Clone();
 114      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 115    }
 116
 117    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 118    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 119    public PBUiBackground Clone() {
 120      return new PBUiBackground(this);
 121    }
 122
 123    /// <summary>Field number for the "color" field.</summary>
 124    public const int ColorFieldNumber = 1;
 125    private global::Decentraland.Common.Color4 color_;
 126    /// <summary>
 127    /// default=(1.0, 1.0, 1.0, 1.0), pixel = color * sample2D(texture, uv)
 128    /// </summary>
 129    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 130    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 131    public global::Decentraland.Common.Color4 Color {
 132      get { return color_; }
 133      set {
 134        color_ = value;
 135      }
 136    }
 137
 138    /// <summary>Field number for the "texture" field.</summary>
 139    public const int TextureFieldNumber = 2;
 140    private global::Decentraland.Common.TextureUnion texture_;
 141    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 142    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 143    public global::Decentraland.Common.TextureUnion Texture {
 144      get { return texture_; }
 145      set {
 146        texture_ = value;
 147      }
 148    }
 149
 150    /// <summary>Field number for the "texture_mode" field.</summary>
 151    public const int TextureModeFieldNumber = 3;
 152    private global::DCL.ECSComponents.BackgroundTextureMode textureMode_ = global::DCL.ECSComponents.BackgroundTextureMo
 153    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 154    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 155    public global::DCL.ECSComponents.BackgroundTextureMode TextureMode {
 156      get { return textureMode_; }
 157      set {
 158        textureMode_ = value;
 159      }
 160    }
 161
 162    /// <summary>Field number for the "texture_slices" field.</summary>
 163    public const int TextureSlicesFieldNumber = 4;
 164    private global::Decentraland.Common.BorderRect textureSlices_;
 165    /// <summary>
 166    /// default=(1/3, 1/3, 1/3, 1/3)
 167    /// </summary>
 168    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 169    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 170    public global::Decentraland.Common.BorderRect TextureSlices {
 171      get { return textureSlices_; }
 172      set {
 173        textureSlices_ = value;
 174      }
 175    }
 176
 177    /// <summary>Field number for the "uvs" field.</summary>
 178    public const int UvsFieldNumber = 5;
 179    private static readonly pb::FieldCodec<float> _repeated_uvs_codec
 180        = pb::FieldCodec.ForFloat(42);
 181    private readonly pbc::RepeatedField<float> uvs_ = new pbc::RepeatedField<float>();
 182    /// <summary>
 183    /// default=[0,0,0,1,1,0,1,0]: starting from bottom-left vertex clock-wise
 184    /// </summary>
 185    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 186    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 187    public pbc::RepeatedField<float> Uvs {
 188      get { return uvs_; }
 189    }
 190
 191    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 192    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 193    public override bool Equals(object other) {
 194      return Equals(other as PBUiBackground);
 195    }
 196
 197    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 198    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 199    public bool Equals(PBUiBackground other) {
 200      if (ReferenceEquals(other, null)) {
 201        return false;
 202      }
 203      if (ReferenceEquals(other, this)) {
 204        return true;
 205      }
 206      if (!object.Equals(Color, other.Color)) return false;
 207      if (!object.Equals(Texture, other.Texture)) return false;
 208      if (TextureMode != other.TextureMode) return false;
 209      if (!object.Equals(TextureSlices, other.TextureSlices)) return false;
 210      if(!uvs_.Equals(other.uvs_)) return false;
 211      return Equals(_unknownFields, other._unknownFields);
 212    }
 213
 214    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 215    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 216    public override int GetHashCode() {
 217      int hash = 1;
 218      if (color_ != null) hash ^= Color.GetHashCode();
 219      if (texture_ != null) hash ^= Texture.GetHashCode();
 220      if (TextureMode != global::DCL.ECSComponents.BackgroundTextureMode.NineSlices) hash ^= TextureMode.GetHashCode();
 221      if (textureSlices_ != null) hash ^= TextureSlices.GetHashCode();
 222      hash ^= uvs_.GetHashCode();
 223      if (_unknownFields != null) {
 224        hash ^= _unknownFields.GetHashCode();
 225      }
 226      return hash;
 227    }
 228
 229    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 230    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 231    public override string ToString() {
 232      return pb::JsonFormatter.ToDiagnosticString(this);
 233    }
 234
 235    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 236    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 237    public void WriteTo(pb::CodedOutputStream output) {
 238    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 239      output.WriteRawMessage(this);
 240    #else
 241      if (color_ != null) {
 242        output.WriteRawTag(10);
 243        output.WriteMessage(Color);
 244      }
 245      if (texture_ != null) {
 246        output.WriteRawTag(18);
 247        output.WriteMessage(Texture);
 248      }
 249      if (TextureMode != global::DCL.ECSComponents.BackgroundTextureMode.NineSlices) {
 250        output.WriteRawTag(24);
 251        output.WriteEnum((int) TextureMode);
 252      }
 253      if (textureSlices_ != null) {
 254        output.WriteRawTag(34);
 255        output.WriteMessage(TextureSlices);
 256      }
 257      uvs_.WriteTo(output, _repeated_uvs_codec);
 258      if (_unknownFields != null) {
 259        _unknownFields.WriteTo(output);
 260      }
 261    #endif
 262    }
 263
 264    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 265    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 266    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 267    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 268      if (color_ != null) {
 269        output.WriteRawTag(10);
 270        output.WriteMessage(Color);
 271      }
 272      if (texture_ != null) {
 273        output.WriteRawTag(18);
 274        output.WriteMessage(Texture);
 275      }
 276      if (TextureMode != global::DCL.ECSComponents.BackgroundTextureMode.NineSlices) {
 277        output.WriteRawTag(24);
 278        output.WriteEnum((int) TextureMode);
 279      }
 280      if (textureSlices_ != null) {
 281        output.WriteRawTag(34);
 282        output.WriteMessage(TextureSlices);
 283      }
 284      uvs_.WriteTo(ref output, _repeated_uvs_codec);
 285      if (_unknownFields != null) {
 286        _unknownFields.WriteTo(ref output);
 287      }
 288    }
 289    #endif
 290
 291    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 292    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 293    public int CalculateSize() {
 294      int size = 0;
 295      if (color_ != null) {
 296        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Color);
 297      }
 298      if (texture_ != null) {
 299        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Texture);
 300      }
 301      if (TextureMode != global::DCL.ECSComponents.BackgroundTextureMode.NineSlices) {
 302        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TextureMode);
 303      }
 304      if (textureSlices_ != null) {
 305        size += 1 + pb::CodedOutputStream.ComputeMessageSize(TextureSlices);
 306      }
 307      size += uvs_.CalculateSize(_repeated_uvs_codec);
 308      if (_unknownFields != null) {
 309        size += _unknownFields.CalculateSize();
 310      }
 311      return size;
 312    }
 313
 314    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 315    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 316    public void MergeFrom(PBUiBackground other) {
 317      if (other == null) {
 318        return;
 319      }
 320      if (other.color_ != null) {
 321        if (color_ == null) {
 322          Color = new global::Decentraland.Common.Color4();
 323        }
 324        Color.MergeFrom(other.Color);
 325      }
 326      if (other.texture_ != null) {
 327        if (texture_ == null) {
 328          Texture = new global::Decentraland.Common.TextureUnion();
 329        }
 330        Texture.MergeFrom(other.Texture);
 331      }
 332      if (other.TextureMode != global::DCL.ECSComponents.BackgroundTextureMode.NineSlices) {
 333        TextureMode = other.TextureMode;
 334      }
 335      if (other.textureSlices_ != null) {
 336        if (textureSlices_ == null) {
 337          TextureSlices = new global::Decentraland.Common.BorderRect();
 338        }
 339        TextureSlices.MergeFrom(other.TextureSlices);
 340      }
 341      uvs_.Add(other.uvs_);
 342      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 343    }
 344
 345    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 346    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 347    public void MergeFrom(pb::CodedInputStream input) {
 348    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 349      input.ReadRawMessage(this);
 350    #else
 351      uint tag;
 352      while ((tag = input.ReadTag()) != 0) {
 353        switch(tag) {
 354          default:
 355            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 356            break;
 357          case 10: {
 358            if (color_ == null) {
 359              Color = new global::Decentraland.Common.Color4();
 360            }
 361            input.ReadMessage(Color);
 362            break;
 363          }
 364          case 18: {
 365            if (texture_ == null) {
 366              Texture = new global::Decentraland.Common.TextureUnion();
 367            }
 368            input.ReadMessage(Texture);
 369            break;
 370          }
 371          case 24: {
 372            TextureMode = (global::DCL.ECSComponents.BackgroundTextureMode) input.ReadEnum();
 373            break;
 374          }
 375          case 34: {
 376            if (textureSlices_ == null) {
 377              TextureSlices = new global::Decentraland.Common.BorderRect();
 378            }
 379            input.ReadMessage(TextureSlices);
 380            break;
 381          }
 382          case 42:
 383          case 45: {
 384            uvs_.AddEntriesFrom(input, _repeated_uvs_codec);
 385            break;
 386          }
 387        }
 388      }
 389    #endif
 390    }
 391
 392    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 393    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 394    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 395    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 396      uint tag;
 397      while ((tag = input.ReadTag()) != 0) {
 398        switch(tag) {
 399          default:
 400            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 401            break;
 402          case 10: {
 403            if (color_ == null) {
 404              Color = new global::Decentraland.Common.Color4();
 405            }
 406            input.ReadMessage(Color);
 407            break;
 408          }
 409          case 18: {
 410            if (texture_ == null) {
 411              Texture = new global::Decentraland.Common.TextureUnion();
 412            }
 413            input.ReadMessage(Texture);
 414            break;
 415          }
 416          case 24: {
 417            TextureMode = (global::DCL.ECSComponents.BackgroundTextureMode) input.ReadEnum();
 418            break;
 419          }
 420          case 34: {
 421            if (textureSlices_ == null) {
 422              TextureSlices = new global::Decentraland.Common.BorderRect();
 423            }
 424            input.ReadMessage(TextureSlices);
 425            break;
 426          }
 427          case 42:
 428          case 45: {
 429            uvs_.AddEntriesFrom(ref input, _repeated_uvs_codec);
 430            break;
 431          }
 432        }
 433      }
 434    }
 435    #endif
 436
 437  }
 438
 439  #endregion
 440
 441}
 442
 443#endregion Designer generated code