< Summary

Class:DCL.ECSComponents.PBUiText
Assembly:DCL.ECSComponents.ProtobufData
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/UiText.gen.cs
Covered lines:42
Uncovered lines:86
Coverable lines:128
Total lines:464
Line coverage:32.8% (42 of 128)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBUiText()0%110100%
get_Descriptor()0%2100%
PBUiText(...)0%12300%
Clone()0%2100%
PBUiText()0%110100%
ClearTextAlign()0%2100%
ClearFont()0%2100%
ClearFontSize()0%2100%
Equals(...)0%110100%
Equals(...)0%40.778020%
GetHashCode()0%56700%
ToString()0%2100%
WriteTo(...)0%9.887061.11%
CalculateSize()0%8.147071.43%
MergeFrom(...)0%72800%
MergeFrom(...)0%17.239053.33%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/UiText.gen.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: ecs/components/UiText.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/UiText.proto</summary>
 15  public static partial class UiTextReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for ecs/components/UiText.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static UiTextReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "ChtlY3MvY29tcG9uZW50cy9VaVRleHQucHJvdG8SEGRlY2VudHJhbGFuZC5l",
 28            "Y3MaImVjcy9jb21wb25lbnRzL2NvbW1vbi9Db2xvcjMucHJvdG8i8AEKCFBC",
 29            "VWlUZXh0Eg0KBXZhbHVlGAEgASgJEiwKBWNvbG9yGAIgASgLMhguZGVjZW50",
 30            "cmFsYW5kLmVjcy5Db2xvcjNIAIgBARI0Cgp0ZXh0X2FsaWduGAMgASgOMhsu",
 31            "ZGVjZW50cmFsYW5kLmVjcy5UZXh0QWxpZ25IAYgBARIpCgRmb250GAQgASgO",
 32            "MhYuZGVjZW50cmFsYW5kLmVjcy5Gb250SAKIAQESFgoJZm9udF9zaXplGAUg",
 33            "ASgFSAOIAQFCCAoGX2NvbG9yQg0KC190ZXh0X2FsaWduQgcKBV9mb250QgwK",
 34            "Cl9mb250X3NpemUqLAoJVGV4dEFsaWduEgoKBkNlbnRlchAAEggKBExlZnQQ",
 35            "ARIJCgVSaWdodBACKikKBEZvbnQSEgoOTGliZXJhdGlvblNhbnMQABINCglT",
 36            "YW5zU2VyaWYQAUIUqgIRRENMLkVDU0NvbXBvbmVudHNiBnByb3RvMw=="));
 37      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 38          new pbr::FileDescriptor[] { global::DCL.ECSComponents.Color3Reflection.Descriptor, },
 39          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::DCL.ECSComponents.TextAlign), typeof(global::DCL.ECSCompon
 40            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBUiText), global::DCL.ECSComponents.PBUiText
 41          }));
 42    }
 43    #endregion
 44
 45  }
 46  #region Enums
 47  public enum TextAlign {
 48    [pbr::OriginalName("Center")] Center = 0,
 49    [pbr::OriginalName("Left")] Left = 1,
 50    [pbr::OriginalName("Right")] Right = 2,
 51  }
 52
 53  public enum Font {
 54    [pbr::OriginalName("LiberationSans")] LiberationSans = 0,
 55    [pbr::OriginalName("SansSerif")] SansSerif = 1,
 56  }
 57
 58  #endregion
 59
 60  #region Messages
 61  public sealed partial class PBUiText : pb::IMessage<PBUiText>
 62  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 63      , pb::IBufferMessage
 64  #endif
 65  {
 266    private static readonly pb::MessageParser<PBUiText> _parser = new pb::MessageParser<PBUiText>(() => new PBUiText());
 67    private pb::UnknownFieldSet _unknownFields;
 68    private int _hasBits0;
 69    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 70    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 071    public static pb::MessageParser<PBUiText> Parser { get { return _parser; } }
 72
 73    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 74    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 75    public static pbr::MessageDescriptor Descriptor {
 076      get { return global::DCL.ECSComponents.UiTextReflection.Descriptor.MessageTypes[0]; }
 77    }
 78
 79    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 80    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 81    pbr::MessageDescriptor pb::IMessage.Descriptor {
 082      get { return Descriptor; }
 83    }
 84
 85    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 86    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 287    public PBUiText() {
 88      OnConstruction();
 289    }
 90
 91    partial void OnConstruction();
 92
 93    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 94    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 095    public PBUiText(PBUiText other) : this() {
 096      _hasBits0 = other._hasBits0;
 097      value_ = other.value_;
 098      color_ = other.color_ != null ? other.color_.Clone() : null;
 099      textAlign_ = other.textAlign_;
 0100      font_ = other.font_;
 0101      fontSize_ = other.fontSize_;
 0102      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 0103    }
 104
 105    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 106    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 107    public PBUiText Clone() {
 0108      return new PBUiText(this);
 109    }
 110
 111    /// <summary>Field number for the "value" field.</summary>
 112    public const int ValueFieldNumber = 1;
 2113    private string value_ = "";
 114    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 115    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 116    public string Value {
 0117      get { return value_; }
 118      set {
 2119        value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 2120      }
 121    }
 122
 123    /// <summary>Field number for the "color" field.</summary>
 124    public const int ColorFieldNumber = 2;
 125    private global::DCL.ECSComponents.Color3 color_;
 126    /// <summary>
 127    /// default=(1.0,1.0,1.0)
 128    /// </summary>
 129    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 130    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 131    public global::DCL.ECSComponents.Color3 Color {
 6132      get { return color_; }
 133      set {
 2134        color_ = value;
 2135      }
 136    }
 137
 138    /// <summary>Field number for the "text_align" field.</summary>
 139    public const int TextAlignFieldNumber = 3;
 140    private global::DCL.ECSComponents.TextAlign textAlign_;
 141    /// <summary>
 142    /// default='center'
 143    /// </summary>
 144    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 145    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 146    public global::DCL.ECSComponents.TextAlign TextAlign {
 0147      get { if ((_hasBits0 & 1) != 0) { return textAlign_; } else { return global::DCL.ECSComponents.TextAlign.Center; }
 148      set {
 0149        _hasBits0 |= 1;
 0150        textAlign_ = value;
 0151      }
 152    }
 153    /// <summary>Gets whether the "text_align" field is set</summary>
 154    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 155    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 156    public bool HasTextAlign {
 0157      get { return (_hasBits0 & 1) != 0; }
 158    }
 159    /// <summary>Clears the value of the "text_align" field</summary>
 160    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 161    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 162    public void ClearTextAlign() {
 0163      _hasBits0 &= ~1;
 0164    }
 165
 166    /// <summary>Field number for the "font" field.</summary>
 167    public const int FontFieldNumber = 4;
 168    private global::DCL.ECSComponents.Font font_;
 169    /// <summary>
 170    /// default=0
 171    /// </summary>
 172    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 173    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 174    public global::DCL.ECSComponents.Font Font {
 0175      get { if ((_hasBits0 & 2) != 0) { return font_; } else { return global::DCL.ECSComponents.Font.LiberationSans; } }
 176      set {
 0177        _hasBits0 |= 2;
 0178        font_ = value;
 0179      }
 180    }
 181    /// <summary>Gets whether the "font" field is set</summary>
 182    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 183    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 184    public bool HasFont {
 0185      get { return (_hasBits0 & 2) != 0; }
 186    }
 187    /// <summary>Clears the value of the "font" field</summary>
 188    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 189    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 190    public void ClearFont() {
 0191      _hasBits0 &= ~2;
 0192    }
 193
 194    /// <summary>Field number for the "font_size" field.</summary>
 195    public const int FontSizeFieldNumber = 5;
 196    private int fontSize_;
 197    /// <summary>
 198    /// default=10
 199    /// </summary>
 200    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 201    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 202    public int FontSize {
 0203      get { if ((_hasBits0 & 4) != 0) { return fontSize_; } else { return 0; } }
 204      set {
 0205        _hasBits0 |= 4;
 0206        fontSize_ = value;
 0207      }
 208    }
 209    /// <summary>Gets whether the "font_size" field is set</summary>
 210    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 211    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 212    public bool HasFontSize {
 0213      get { return (_hasBits0 & 4) != 0; }
 214    }
 215    /// <summary>Clears the value of the "font_size" field</summary>
 216    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 217    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 218    public void ClearFontSize() {
 0219      _hasBits0 &= ~4;
 0220    }
 221
 222    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 223    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 224    public override bool Equals(object other) {
 1225      return Equals(other as PBUiText);
 226    }
 227
 228    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 229    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 230    public bool Equals(PBUiText other) {
 1231      if (ReferenceEquals(other, null)) {
 0232        return false;
 233      }
 1234      if (ReferenceEquals(other, this)) {
 1235        return true;
 236      }
 0237      if (Value != other.Value) return false;
 0238      if (!object.Equals(Color, other.Color)) return false;
 0239      if (TextAlign != other.TextAlign) return false;
 0240      if (Font != other.Font) return false;
 0241      if (FontSize != other.FontSize) return false;
 0242      return Equals(_unknownFields, other._unknownFields);
 243    }
 244
 245    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 246    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 247    public override int GetHashCode() {
 0248      int hash = 1;
 0249      if (Value.Length != 0) hash ^= Value.GetHashCode();
 0250      if (color_ != null) hash ^= Color.GetHashCode();
 0251      if (HasTextAlign) hash ^= TextAlign.GetHashCode();
 0252      if (HasFont) hash ^= Font.GetHashCode();
 0253      if (HasFontSize) hash ^= FontSize.GetHashCode();
 0254      if (_unknownFields != null) {
 0255        hash ^= _unknownFields.GetHashCode();
 256      }
 0257      return hash;
 258    }
 259
 260    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 261    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 262    public override string ToString() {
 0263      return pb::JsonFormatter.ToDiagnosticString(this);
 264    }
 265
 266    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 267    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 268    public void WriteTo(pb::CodedOutputStream output) {
 269    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 270      output.WriteRawMessage(this);
 271    #else
 2272      if (Value.Length != 0) {
 1273        output.WriteRawTag(10);
 1274        output.WriteString(Value);
 275      }
 2276      if (color_ != null) {
 1277        output.WriteRawTag(18);
 1278        output.WriteMessage(Color);
 279      }
 2280      if (HasTextAlign) {
 0281        output.WriteRawTag(24);
 0282        output.WriteEnum((int) TextAlign);
 283      }
 2284      if (HasFont) {
 0285        output.WriteRawTag(32);
 0286        output.WriteEnum((int) Font);
 287      }
 2288      if (HasFontSize) {
 0289        output.WriteRawTag(40);
 0290        output.WriteInt32(FontSize);
 291      }
 2292      if (_unknownFields != null) {
 0293        _unknownFields.WriteTo(output);
 294      }
 295    #endif
 2296    }
 297
 298    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 299    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 300    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 301    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 302      if (Value.Length != 0) {
 303        output.WriteRawTag(10);
 304        output.WriteString(Value);
 305      }
 306      if (color_ != null) {
 307        output.WriteRawTag(18);
 308        output.WriteMessage(Color);
 309      }
 310      if (HasTextAlign) {
 311        output.WriteRawTag(24);
 312        output.WriteEnum((int) TextAlign);
 313      }
 314      if (HasFont) {
 315        output.WriteRawTag(32);
 316        output.WriteEnum((int) Font);
 317      }
 318      if (HasFontSize) {
 319        output.WriteRawTag(40);
 320        output.WriteInt32(FontSize);
 321      }
 322      if (_unknownFields != null) {
 323        _unknownFields.WriteTo(ref output);
 324      }
 325    }
 326    #endif
 327
 328    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 329    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 330    public int CalculateSize() {
 2331      int size = 0;
 2332      if (Value.Length != 0) {
 1333        size += 1 + pb::CodedOutputStream.ComputeStringSize(Value);
 334      }
 2335      if (color_ != null) {
 1336        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Color);
 337      }
 2338      if (HasTextAlign) {
 0339        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TextAlign);
 340      }
 2341      if (HasFont) {
 0342        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Font);
 343      }
 2344      if (HasFontSize) {
 0345        size += 1 + pb::CodedOutputStream.ComputeInt32Size(FontSize);
 346      }
 2347      if (_unknownFields != null) {
 0348        size += _unknownFields.CalculateSize();
 349      }
 2350      return size;
 351    }
 352
 353    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 354    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 355    public void MergeFrom(PBUiText other) {
 0356      if (other == null) {
 0357        return;
 358      }
 0359      if (other.Value.Length != 0) {
 0360        Value = other.Value;
 361      }
 0362      if (other.color_ != null) {
 0363        if (color_ == null) {
 0364          Color = new global::DCL.ECSComponents.Color3();
 365        }
 0366        Color.MergeFrom(other.Color);
 367      }
 0368      if (other.HasTextAlign) {
 0369        TextAlign = other.TextAlign;
 370      }
 0371      if (other.HasFont) {
 0372        Font = other.Font;
 373      }
 0374      if (other.HasFontSize) {
 0375        FontSize = other.FontSize;
 376      }
 0377      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0378    }
 379
 380    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 381    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 382    public void MergeFrom(pb::CodedInputStream input) {
 383    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 384      input.ReadRawMessage(this);
 385    #else
 386      uint tag;
 3387      while ((tag = input.ReadTag()) != 0) {
 388        switch(tag) {
 389          default:
 0390            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0391            break;
 392          case 10: {
 1393            Value = input.ReadString();
 1394            break;
 395          }
 396          case 18: {
 1397            if (color_ == null) {
 1398              Color = new global::DCL.ECSComponents.Color3();
 399            }
 1400            input.ReadMessage(Color);
 1401            break;
 402          }
 403          case 24: {
 0404            TextAlign = (global::DCL.ECSComponents.TextAlign) input.ReadEnum();
 0405            break;
 406          }
 407          case 32: {
 0408            Font = (global::DCL.ECSComponents.Font) input.ReadEnum();
 0409            break;
 410          }
 411          case 40: {
 0412            FontSize = input.ReadInt32();
 413            break;
 414          }
 415        }
 416      }
 417    #endif
 1418    }
 419
 420    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 421    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 422    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 423    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 424      uint tag;
 425      while ((tag = input.ReadTag()) != 0) {
 426        switch(tag) {
 427          default:
 428            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 429            break;
 430          case 10: {
 431            Value = input.ReadString();
 432            break;
 433          }
 434          case 18: {
 435            if (color_ == null) {
 436              Color = new global::DCL.ECSComponents.Color3();
 437            }
 438            input.ReadMessage(Color);
 439            break;
 440          }
 441          case 24: {
 442            TextAlign = (global::DCL.ECSComponents.TextAlign) input.ReadEnum();
 443            break;
 444          }
 445          case 32: {
 446            Font = (global::DCL.ECSComponents.Font) input.ReadEnum();
 447            break;
 448          }
 449          case 40: {
 450            FontSize = input.ReadInt32();
 451            break;
 452          }
 453        }
 454      }
 455    }
 456    #endif
 457
 458  }
 459
 460  #endregion
 461
 462}
 463
 464#endregion Designer generated code