< Summary

Class:Decentraland.Common.Entity
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Entity.gen.cs
Covered lines:45
Uncovered lines:59
Coverable lines:104
Total lines:362
Line coverage:43.2% (45 of 104)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Entity()0%110100%
get_Descriptor()0%2100%
Entity(...)0%2100%
Clone()0%2100%
Entity()0%110100%
Equals(...)0%2100%
Equals(...)0%72800%
GetHashCode()0%30500%
ToString()0%2100%
WriteTo(...)0%5.255078.57%
CalculateSize()0%5.125083.33%
MergeFrom(...)0%30500%
MergeFrom(...)0%17.998046.15%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: decentraland/common/entity.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 Decentraland.Common {
 13
 14  /// <summary>Holder for reflection information generated from decentraland/common/entity.proto</summary>
 15  public static partial class EntityReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for decentraland/common/entity.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static EntityReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "CiBkZWNlbnRyYWxhbmQvY29tbW9uL2VudGl0eS5wcm90bxITZGVjZW50cmFs",
 28            "YW5kLmNvbW1vbhopZGVjZW50cmFsYW5kL2NvbW1vbi9jb250ZW50X21hcHBp",
 29            "bmcucHJvdG8igQEKBkVudGl0eRIKCgJpZBgBIAEoCRIQCghwb2ludGVycxgC",
 30            "IAMoCRIQCghtZXRhZGF0YRgDIAEoCRIRCgl0aW1lc3RhbXAYBCABKA0SNAoH",
 31            "Y29udGVudBgFIAMoCzIjLmRlY2VudHJhbGFuZC5jb21tb24uQ29udGVudE1h",
 32            "cHBpbmdiBnByb3RvMw=="));
 33      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 34          new pbr::FileDescriptor[] { global::Decentraland.Common.ContentMappingReflection.Descriptor, },
 35          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 36            new pbr::GeneratedClrTypeInfo(typeof(global::Decentraland.Common.Entity), global::Decentraland.Common.Entity
 37          }));
 38    }
 39    #endregion
 40
 41  }
 42  #region Messages
 43  public sealed partial class Entity : pb::IMessage<Entity>
 44  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 45      , pb::IBufferMessage
 46  #endif
 47  {
 148    private static readonly pb::MessageParser<Entity> _parser = new pb::MessageParser<Entity>(() => new Entity());
 49    private pb::UnknownFieldSet _unknownFields;
 50    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 51    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 152    public static pb::MessageParser<Entity> Parser { get { return _parser; } }
 53
 54    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 55    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 56    public static pbr::MessageDescriptor Descriptor {
 057      get { return global::Decentraland.Common.EntityReflection.Descriptor.MessageTypes[0]; }
 58    }
 59
 60    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 61    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 62    pbr::MessageDescriptor pb::IMessage.Descriptor {
 063      get { return Descriptor; }
 64    }
 65
 66    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 67    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 668    public Entity() {
 69      OnConstruction();
 670    }
 71
 72    partial void OnConstruction();
 73
 74    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 75    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 076    public Entity(Entity other) : this() {
 077      id_ = other.id_;
 078      pointers_ = other.pointers_.Clone();
 079      metadata_ = other.metadata_;
 080      timestamp_ = other.timestamp_;
 081      content_ = other.content_.Clone();
 082      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 083    }
 84
 85    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 86    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 87    public Entity Clone() {
 088      return new Entity(this);
 89    }
 90
 91    /// <summary>Field number for the "id" field.</summary>
 92    public const int IdFieldNumber = 1;
 693    private string id_ = "";
 94    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 95    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 96    public string Id {
 2197      get { return id_; }
 98      set {
 699        id_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 6100      }
 101    }
 102
 103    /// <summary>Field number for the "pointers" field.</summary>
 104    public const int PointersFieldNumber = 2;
 1105    private static readonly pb::FieldCodec<string> _repeated_pointers_codec
 106        = pb::FieldCodec.ForString(18);
 6107    private readonly pbc::RepeatedField<string> pointers_ = new pbc::RepeatedField<string>();
 108    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 109    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 110    public pbc::RepeatedField<string> Pointers {
 0111      get { return pointers_; }
 112    }
 113
 114    /// <summary>Field number for the "metadata" field.</summary>
 115    public const int MetadataFieldNumber = 3;
 6116    private string metadata_ = "";
 117    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 118    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 119    public string Metadata {
 21120      get { return metadata_; }
 121      set {
 6122        metadata_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
 6123      }
 124    }
 125
 126    /// <summary>Field number for the "timestamp" field.</summary>
 127    public const int TimestampFieldNumber = 4;
 128    private uint timestamp_;
 129    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 130    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 131    public uint Timestamp {
 9132      get { return timestamp_; }
 133      set {
 0134        timestamp_ = value;
 0135      }
 136    }
 137
 138    /// <summary>Field number for the "content" field.</summary>
 139    public const int ContentFieldNumber = 5;
 1140    private static readonly pb::FieldCodec<global::Decentraland.Common.ContentMapping> _repeated_content_codec
 141        = pb::FieldCodec.ForMessage(42, global::Decentraland.Common.ContentMapping.Parser);
 6142    private readonly pbc::RepeatedField<global::Decentraland.Common.ContentMapping> content_ = new pbc::RepeatedField<gl
 143    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 144    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 145    public pbc::RepeatedField<global::Decentraland.Common.ContentMapping> Content {
 3146      get { return content_; }
 147    }
 148
 149    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 150    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 151    public override bool Equals(object other) {
 0152      return Equals(other as Entity);
 153    }
 154
 155    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 156    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 157    public bool Equals(Entity other) {
 0158      if (ReferenceEquals(other, null)) {
 0159        return false;
 160      }
 0161      if (ReferenceEquals(other, this)) {
 0162        return true;
 163      }
 0164      if (Id != other.Id) return false;
 0165      if(!pointers_.Equals(other.pointers_)) return false;
 0166      if (Metadata != other.Metadata) return false;
 0167      if (Timestamp != other.Timestamp) return false;
 0168      if(!content_.Equals(other.content_)) return false;
 0169      return Equals(_unknownFields, other._unknownFields);
 170    }
 171
 172    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 173    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 174    public override int GetHashCode() {
 0175      int hash = 1;
 0176      if (Id.Length != 0) hash ^= Id.GetHashCode();
 0177      hash ^= pointers_.GetHashCode();
 0178      if (Metadata.Length != 0) hash ^= Metadata.GetHashCode();
 0179      if (Timestamp != 0) hash ^= Timestamp.GetHashCode();
 0180      hash ^= content_.GetHashCode();
 0181      if (_unknownFields != null) {
 0182        hash ^= _unknownFields.GetHashCode();
 183      }
 0184      return hash;
 185    }
 186
 187    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 188    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 189    public override string ToString() {
 0190      return pb::JsonFormatter.ToDiagnosticString(this);
 191    }
 192
 193    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 194    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 195    public void WriteTo(pb::CodedOutputStream output) {
 196    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 197      output.WriteRawMessage(this);
 198    #else
 3199      if (Id.Length != 0) {
 3200        output.WriteRawTag(10);
 3201        output.WriteString(Id);
 202      }
 3203      pointers_.WriteTo(output, _repeated_pointers_codec);
 3204      if (Metadata.Length != 0) {
 3205        output.WriteRawTag(26);
 3206        output.WriteString(Metadata);
 207      }
 3208      if (Timestamp != 0) {
 0209        output.WriteRawTag(32);
 0210        output.WriteUInt32(Timestamp);
 211      }
 3212      content_.WriteTo(output, _repeated_content_codec);
 3213      if (_unknownFields != null) {
 0214        _unknownFields.WriteTo(output);
 215      }
 216    #endif
 3217    }
 218
 219    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 220    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 221    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 222    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 223      if (Id.Length != 0) {
 224        output.WriteRawTag(10);
 225        output.WriteString(Id);
 226      }
 227      pointers_.WriteTo(ref output, _repeated_pointers_codec);
 228      if (Metadata.Length != 0) {
 229        output.WriteRawTag(26);
 230        output.WriteString(Metadata);
 231      }
 232      if (Timestamp != 0) {
 233        output.WriteRawTag(32);
 234        output.WriteUInt32(Timestamp);
 235      }
 236      content_.WriteTo(ref output, _repeated_content_codec);
 237      if (_unknownFields != null) {
 238        _unknownFields.WriteTo(ref output);
 239      }
 240    }
 241    #endif
 242
 243    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 244    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 245    public int CalculateSize() {
 6246      int size = 0;
 6247      if (Id.Length != 0) {
 6248        size += 1 + pb::CodedOutputStream.ComputeStringSize(Id);
 249      }
 6250      size += pointers_.CalculateSize(_repeated_pointers_codec);
 6251      if (Metadata.Length != 0) {
 6252        size += 1 + pb::CodedOutputStream.ComputeStringSize(Metadata);
 253      }
 6254      if (Timestamp != 0) {
 0255        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Timestamp);
 256      }
 6257      size += content_.CalculateSize(_repeated_content_codec);
 6258      if (_unknownFields != null) {
 0259        size += _unknownFields.CalculateSize();
 260      }
 6261      return size;
 262    }
 263
 264    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 265    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 266    public void MergeFrom(Entity other) {
 0267      if (other == null) {
 0268        return;
 269      }
 0270      if (other.Id.Length != 0) {
 0271        Id = other.Id;
 272      }
 0273      pointers_.Add(other.pointers_);
 0274      if (other.Metadata.Length != 0) {
 0275        Metadata = other.Metadata;
 276      }
 0277      if (other.Timestamp != 0) {
 0278        Timestamp = other.Timestamp;
 279      }
 0280      content_.Add(other.content_);
 0281      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0282    }
 283
 284    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 285    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 286    public void MergeFrom(pb::CodedInputStream input) {
 287    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 288      input.ReadRawMessage(this);
 289    #else
 290      uint tag;
 9291      while ((tag = input.ReadTag()) != 0) {
 292        switch(tag) {
 293          default:
 0294            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0295            break;
 296          case 10: {
 3297            Id = input.ReadString();
 3298            break;
 299          }
 300          case 18: {
 0301            pointers_.AddEntriesFrom(input, _repeated_pointers_codec);
 0302            break;
 303          }
 304          case 26: {
 3305            Metadata = input.ReadString();
 3306            break;
 307          }
 308          case 32: {
 0309            Timestamp = input.ReadUInt32();
 0310            break;
 311          }
 312          case 42: {
 0313            content_.AddEntriesFrom(input, _repeated_content_codec);
 314            break;
 315          }
 316        }
 317      }
 318    #endif
 3319    }
 320
 321    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 322    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 323    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 324    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 325      uint tag;
 326      while ((tag = input.ReadTag()) != 0) {
 327        switch(tag) {
 328          default:
 329            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 330            break;
 331          case 10: {
 332            Id = input.ReadString();
 333            break;
 334          }
 335          case 18: {
 336            pointers_.AddEntriesFrom(ref input, _repeated_pointers_codec);
 337            break;
 338          }
 339          case 26: {
 340            Metadata = input.ReadString();
 341            break;
 342          }
 343          case 32: {
 344            Timestamp = input.ReadUInt32();
 345            break;
 346          }
 347          case 42: {
 348            content_.AddEntriesFrom(ref input, _repeated_content_codec);
 349            break;
 350          }
 351        }
 352      }
 353    }
 354    #endif
 355
 356  }
 357
 358  #endregion
 359
 360}
 361
 362#endregion Designer generated code