< Summary

Class:DCL.ECSComponents.PBNFTShape
Assembly:DCL.ECSComponents.ProtobufData
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/PBFiles/NFTShape.cs
Covered lines:65
Uncovered lines:100
Coverable lines:165
Total lines:544
Line coverage:39.3% (65 of 165)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
PBNFTShape()0%110100%
get_Descriptor()0%2100%
PBNFTShape(...)0%12300%
Clone()0%2100%
ClearWithCollisions()0%2100%
ClearIsPointerBlocker()0%2100%
ClearVisible()0%2100%
PBNFTShape()0%110100%
ClearAssetId()0%2100%
ClearStyle()0%2100%
Equals(...)0%2100%
Equals(...)0%1101000%
GetHashCode()0%90900%
ToString()0%2100%
WriteTo(...)0%9.739079.17%
CalculateSize()0%9.389083.33%
MergeFrom(...)0%1101000%
MergeFrom(...)0%16.5412068.42%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/PBFiles/NFTShape.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: NFTShape.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 NFTShape.proto</summary>
 15  public static partial class NFTShapeReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for NFTShape.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static NFTShapeReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "Cg5ORlRTaGFwZS5wcm90bxIQZGVjZW50cmFsYW5kLmVjcxoTY29tbW9uL0Nv",
 28            "bG9yMy5wcm90byKOAgoKUEJORlRTaGFwZRIcCg93aXRoX2NvbGxpc2lvbnMY",
 29            "ASABKAhIAIgBARIfChJpc19wb2ludGVyX2Jsb2NrZXIYAiABKAhIAYgBARIU",
 30            "Cgd2aXNpYmxlGAMgASgISAKIAQESCwoDc3JjGAQgASgJEhUKCGFzc2V0X2lk",
 31            "GAUgASgJSAOIAQESEgoFc3R5bGUYBiABKAVIBIgBARIbCgVjb2xvchgHIAEo",
 32            "CzIHLkNvbG9yM0gFiAEBQhIKEF93aXRoX2NvbGxpc2lvbnNCFQoTX2lzX3Bv",
 33            "aW50ZXJfYmxvY2tlckIKCghfdmlzaWJsZUILCglfYXNzZXRfaWRCCAoGX3N0",
 34            "eWxlQggKBl9jb2xvckIUqgIRRENMLkVDU0NvbXBvbmVudHNiBnByb3RvMw=="));
 35      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 36          new pbr::FileDescriptor[] { global::Color3Reflection.Descriptor, },
 37          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 38            new pbr::GeneratedClrTypeInfo(typeof(global::DCL.ECSComponents.PBNFTShape), global::DCL.ECSComponents.PBNFTS
 39          }));
 40    }
 41    #endregion
 42
 43  }
 44  #region Messages
 45  public sealed partial class PBNFTShape : pb::IMessage<PBNFTShape>
 46  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 47      , pb::IBufferMessage
 48  #endif
 49  {
 450    private static readonly pb::MessageParser<PBNFTShape> _parser = new pb::MessageParser<PBNFTShape>(() => new PBNFTSha
 51    private pb::UnknownFieldSet _unknownFields;
 52    private int _hasBits0;
 53    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 54    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 055    public static pb::MessageParser<PBNFTShape> Parser { get { return _parser; } }
 56
 57    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 58    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 59    public static pbr::MessageDescriptor Descriptor {
 060      get { return global::DCL.ECSComponents.NFTShapeReflection.Descriptor.MessageTypes[0]; }
 61    }
 62
 63    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 64    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 65    pbr::MessageDescriptor pb::IMessage.Descriptor {
 066      get { return Descriptor; }
 67    }
 68
 69    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 70    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 871    public PBNFTShape() {
 72      OnConstruction();
 873    }
 74
 75    partial void OnConstruction();
 76
 77    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 78    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 079    public PBNFTShape(PBNFTShape other) : this() {
 080      _hasBits0 = other._hasBits0;
 081      withCollisions_ = other.withCollisions_;
 082      isPointerBlocker_ = other.isPointerBlocker_;
 083      visible_ = other.visible_;
 084      src_ = other.src_;
 085      assetId_ = other.assetId_;
 086      style_ = other.style_;
 087      color_ = other.color_ != null ? other.color_.Clone() : null;
 088      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 089    }
 90
 91    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 92    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 93    public PBNFTShape Clone() {
 094      return new PBNFTShape(this);
 95    }
 96
 97    /// <summary>Field number for the "with_collisions" field.</summary>
 98    public const int WithCollisionsFieldNumber = 1;
 99    private bool withCollisions_;
 100    /// <summary>
 101    /// @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366
 102    /// </summary>
 103    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 104    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 105    public bool WithCollisions {
 0106      get { if ((_hasBits0 & 1) != 0) { return withCollisions_; } else { return false; } }
 107      set {
 7108        _hasBits0 |= 1;
 7109        withCollisions_ = value;
 7110      }
 111    }
 112    /// <summary>Gets whether the "with_collisions" field is set</summary>
 113    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 114    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 115    public bool HasWithCollisions {
 0116      get { return (_hasBits0 & 1) != 0; }
 117    }
 118    /// <summary>Clears the value of the "with_collisions" field</summary>
 119    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 120    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 121    public void ClearWithCollisions() {
 0122      _hasBits0 &= ~1;
 0123    }
 124
 125    /// <summary>Field number for the "is_pointer_blocker" field.</summary>
 126    public const int IsPointerBlockerFieldNumber = 2;
 127    private bool isPointerBlocker_;
 128    /// <summary>
 129    /// @deprecated use MeshCollider instead https://github.com/decentraland/sdk/issues/366
 130    /// </summary>
 131    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 132    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 133    public bool IsPointerBlocker {
 0134      get { if ((_hasBits0 & 2) != 0) { return isPointerBlocker_; } else { return false; } }
 135      set {
 6136        _hasBits0 |= 2;
 6137        isPointerBlocker_ = value;
 6138      }
 139    }
 140    /// <summary>Gets whether the "is_pointer_blocker" field is set</summary>
 141    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 142    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 143    public bool HasIsPointerBlocker {
 0144      get { return (_hasBits0 & 2) != 0; }
 145    }
 146    /// <summary>Clears the value of the "is_pointer_blocker" field</summary>
 147    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 148    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 149    public void ClearIsPointerBlocker() {
 0150      _hasBits0 &= ~2;
 0151    }
 152
 153    /// <summary>Field number for the "visible" field.</summary>
 154    public const int VisibleFieldNumber = 3;
 155    private bool visible_;
 156    /// <summary>
 157    /// @deprecated use HiddenComponent instead https://github.com/decentraland/sdk/issues/353
 158    /// </summary>
 159    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 160    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 161    public bool Visible {
 0162      get { if ((_hasBits0 & 4) != 0) { return visible_; } else { return false; } }
 163      set {
 7164        _hasBits0 |= 4;
 7165        visible_ = value;
 7166      }
 167    }
 168    /// <summary>Gets whether the "visible" field is set</summary>
 169    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 170    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 171    public bool HasVisible {
 0172      get { return (_hasBits0 & 4) != 0; }
 173    }
 174    /// <summary>Clears the value of the "visible" field</summary>
 175    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 176    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 177    public void ClearVisible() {
 0178      _hasBits0 &= ~4;
 0179    }
 180
 181    /// <summary>Field number for the "src" field.</summary>
 182    public const int SrcFieldNumber = 4;
 8183    private string src_ = "";
 184    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 185    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 186    public string Src {
 0187      get { return src_; }
 188      set {
 8189        src_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 8190      }
 191    }
 192
 193    /// <summary>Field number for the "asset_id" field.</summary>
 194    public const int AssetIdFieldNumber = 5;
 195    private string assetId_;
 196    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 197    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 198    public string AssetId {
 0199      get { return assetId_ ?? ""; }
 200      set {
 0201        assetId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 0202      }
 203    }
 204    /// <summary>Gets whether the "asset_id" field is set</summary>
 205    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 206    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 207    public bool HasAssetId {
 0208      get { return assetId_ != null; }
 209    }
 210    /// <summary>Clears the value of the "asset_id" field</summary>
 211    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 212    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 213    public void ClearAssetId() {
 0214      assetId_ = null;
 0215    }
 216
 217    /// <summary>Field number for the "style" field.</summary>
 218    public const int StyleFieldNumber = 6;
 219    private int style_;
 220    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 221    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 222    public int Style {
 0223      get { if ((_hasBits0 & 8) != 0) { return style_; } else { return 0; } }
 224      set {
 0225        _hasBits0 |= 8;
 0226        style_ = value;
 0227      }
 228    }
 229    /// <summary>Gets whether the "style" field is set</summary>
 230    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 231    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 232    public bool HasStyle {
 0233      get { return (_hasBits0 & 8) != 0; }
 234    }
 235    /// <summary>Clears the value of the "style" field</summary>
 236    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 237    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 238    public void ClearStyle() {
 0239      _hasBits0 &= ~8;
 0240    }
 241
 242    /// <summary>Field number for the "color" field.</summary>
 243    public const int ColorFieldNumber = 7;
 244    private global::Color3 color_;
 245    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 246    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 247    public global::Color3 Color {
 24248      get { return color_; }
 249      set {
 8250        color_ = value;
 8251      }
 252    }
 253
 254    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 255    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 256    public override bool Equals(object other) {
 0257      return Equals(other as PBNFTShape);
 258    }
 259
 260    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 261    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 262    public bool Equals(PBNFTShape other) {
 0263      if (ReferenceEquals(other, null)) {
 0264        return false;
 265      }
 0266      if (ReferenceEquals(other, this)) {
 0267        return true;
 268      }
 0269      if (WithCollisions != other.WithCollisions) return false;
 0270      if (IsPointerBlocker != other.IsPointerBlocker) return false;
 0271      if (Visible != other.Visible) return false;
 0272      if (Src != other.Src) return false;
 0273      if (AssetId != other.AssetId) return false;
 0274      if (Style != other.Style) return false;
 0275      if (!object.Equals(Color, other.Color)) return false;
 0276      return Equals(_unknownFields, other._unknownFields);
 277    }
 278
 279    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 280    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 281    public override int GetHashCode() {
 0282      int hash = 1;
 0283      if (HasWithCollisions) hash ^= WithCollisions.GetHashCode();
 0284      if (HasIsPointerBlocker) hash ^= IsPointerBlocker.GetHashCode();
 0285      if (HasVisible) hash ^= Visible.GetHashCode();
 0286      if (Src.Length != 0) hash ^= Src.GetHashCode();
 0287      if (HasAssetId) hash ^= AssetId.GetHashCode();
 0288      if (HasStyle) hash ^= Style.GetHashCode();
 0289      if (color_ != null) hash ^= Color.GetHashCode();
 0290      if (_unknownFields != null) {
 0291        hash ^= _unknownFields.GetHashCode();
 292      }
 0293      return hash;
 294    }
 295
 296    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 297    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 298    public override string ToString() {
 0299      return pb::JsonFormatter.ToDiagnosticString(this);
 300    }
 301
 302    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 303    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 304    public void WriteTo(pb::CodedOutputStream output) {
 305    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 306      output.WriteRawMessage(this);
 307    #else
 4308      if (HasWithCollisions) {
 3309        output.WriteRawTag(8);
 3310        output.WriteBool(WithCollisions);
 311      }
 4312      if (HasIsPointerBlocker) {
 3313        output.WriteRawTag(16);
 3314        output.WriteBool(IsPointerBlocker);
 315      }
 4316      if (HasVisible) {
 3317        output.WriteRawTag(24);
 3318        output.WriteBool(Visible);
 319      }
 4320      if (Src.Length != 0) {
 3321        output.WriteRawTag(34);
 3322        output.WriteString(Src);
 323      }
 4324      if (HasAssetId) {
 0325        output.WriteRawTag(42);
 0326        output.WriteString(AssetId);
 327      }
 4328      if (HasStyle) {
 0329        output.WriteRawTag(48);
 0330        output.WriteInt32(Style);
 331      }
 4332      if (color_ != null) {
 3333        output.WriteRawTag(58);
 3334        output.WriteMessage(Color);
 335      }
 4336      if (_unknownFields != null) {
 0337        _unknownFields.WriteTo(output);
 338      }
 339    #endif
 4340    }
 341
 342    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 343    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 344    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 345    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 346      if (HasWithCollisions) {
 347        output.WriteRawTag(8);
 348        output.WriteBool(WithCollisions);
 349      }
 350      if (HasIsPointerBlocker) {
 351        output.WriteRawTag(16);
 352        output.WriteBool(IsPointerBlocker);
 353      }
 354      if (HasVisible) {
 355        output.WriteRawTag(24);
 356        output.WriteBool(Visible);
 357      }
 358      if (Src.Length != 0) {
 359        output.WriteRawTag(34);
 360        output.WriteString(Src);
 361      }
 362      if (HasAssetId) {
 363        output.WriteRawTag(42);
 364        output.WriteString(AssetId);
 365      }
 366      if (HasStyle) {
 367        output.WriteRawTag(48);
 368        output.WriteInt32(Style);
 369      }
 370      if (color_ != null) {
 371        output.WriteRawTag(58);
 372        output.WriteMessage(Color);
 373      }
 374      if (_unknownFields != null) {
 375        _unknownFields.WriteTo(ref output);
 376      }
 377    }
 378    #endif
 379
 380    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 381    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 382    public int CalculateSize() {
 3383      int size = 0;
 3384      if (HasWithCollisions) {
 3385        size += 1 + 1;
 386      }
 3387      if (HasIsPointerBlocker) {
 3388        size += 1 + 1;
 389      }
 3390      if (HasVisible) {
 3391        size += 1 + 1;
 392      }
 3393      if (Src.Length != 0) {
 3394        size += 1 + pb::CodedOutputStream.ComputeStringSize(Src);
 395      }
 3396      if (HasAssetId) {
 0397        size += 1 + pb::CodedOutputStream.ComputeStringSize(AssetId);
 398      }
 3399      if (HasStyle) {
 0400        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Style);
 401      }
 3402      if (color_ != null) {
 3403        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Color);
 404      }
 3405      if (_unknownFields != null) {
 0406        size += _unknownFields.CalculateSize();
 407      }
 3408      return size;
 409    }
 410
 411    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 412    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 413    public void MergeFrom(PBNFTShape other) {
 0414      if (other == null) {
 0415        return;
 416      }
 0417      if (other.HasWithCollisions) {
 0418        WithCollisions = other.WithCollisions;
 419      }
 0420      if (other.HasIsPointerBlocker) {
 0421        IsPointerBlocker = other.IsPointerBlocker;
 422      }
 0423      if (other.HasVisible) {
 0424        Visible = other.Visible;
 425      }
 0426      if (other.Src.Length != 0) {
 0427        Src = other.Src;
 428      }
 0429      if (other.HasAssetId) {
 0430        AssetId = other.AssetId;
 431      }
 0432      if (other.HasStyle) {
 0433        Style = other.Style;
 434      }
 0435      if (other.color_ != null) {
 0436        if (color_ == null) {
 0437          Color = new global::Color3();
 438        }
 0439        Color.MergeFrom(other.Color);
 440      }
 0441      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0442    }
 443
 444    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 445    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 446    public void MergeFrom(pb::CodedInputStream input) {
 447    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 448      input.ReadRawMessage(this);
 449    #else
 450      uint tag;
 18451      while ((tag = input.ReadTag()) != 0) {
 452        switch(tag) {
 453          default:
 0454            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0455            break;
 456          case 8: {
 3457            WithCollisions = input.ReadBool();
 3458            break;
 459          }
 460          case 16: {
 3461            IsPointerBlocker = input.ReadBool();
 3462            break;
 463          }
 464          case 24: {
 3465            Visible = input.ReadBool();
 3466            break;
 467          }
 468          case 34: {
 3469            Src = input.ReadString();
 3470            break;
 471          }
 472          case 42: {
 0473            AssetId = input.ReadString();
 0474            break;
 475          }
 476          case 48: {
 0477            Style = input.ReadInt32();
 0478            break;
 479          }
 480          case 58: {
 3481            if (color_ == null) {
 3482              Color = new global::Color3();
 483            }
 3484            input.ReadMessage(Color);
 485            break;
 486          }
 487        }
 488      }
 489    #endif
 3490    }
 491
 492    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 493    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 494    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 495    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 496      uint tag;
 497      while ((tag = input.ReadTag()) != 0) {
 498        switch(tag) {
 499          default:
 500            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 501            break;
 502          case 8: {
 503            WithCollisions = input.ReadBool();
 504            break;
 505          }
 506          case 16: {
 507            IsPointerBlocker = input.ReadBool();
 508            break;
 509          }
 510          case 24: {
 511            Visible = input.ReadBool();
 512            break;
 513          }
 514          case 34: {
 515            Src = input.ReadString();
 516            break;
 517          }
 518          case 42: {
 519            AssetId = input.ReadString();
 520            break;
 521          }
 522          case 48: {
 523            Style = input.ReadInt32();
 524            break;
 525          }
 526          case 58: {
 527            if (color_ == null) {
 528              Color = new global::Color3();
 529            }
 530            input.ReadMessage(Color);
 531            break;
 532          }
 533        }
 534      }
 535    }
 536    #endif
 537
 538  }
 539
 540  #endregion
 541
 542}
 543
 544#endregion Designer generated code