< Summary

Class:Color3
Assembly:DCL.ECSComponents.ProtobufData
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/PBFiles/Common/Color3.cs
Covered lines:54
Uncovered lines:26
Coverable lines:80
Total lines:303
Line coverage:67.5% (54 of 80)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Color3()0%110100%
get_Descriptor()0%2100%
Color3()0%110100%
Color3(...)0%110100%
Clone()0%2100%
Equals(...)0%2100%
Equals(...)0%7.736063.64%
GetHashCode()0%6.65060%
ToString()0%2100%
WriteTo(...)0%5.015091.67%
CalculateSize()0%5.025090%
MergeFrom(...)0%30500%
MergeFrom(...)0%5.275077.78%

File(s)

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

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: Color3.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;
 12/// <summary>Holder for reflection information generated from Color3.proto</summary>
 13public static partial class Color3Reflection {
 14
 15  #region Descriptor
 16  /// <summary>File descriptor for Color3.proto</summary>
 17  public static pbr::FileDescriptor Descriptor {
 18    get { return descriptor; }
 19  }
 20  private static pbr::FileDescriptor descriptor;
 21
 22  static Color3Reflection() {
 23    byte[] descriptorData = global::System.Convert.FromBase64String(
 24        string.Concat(
 25          "CgxDb2xvcjMucHJvdG8iKQoGQ29sb3IzEgkKAXIYASABKAISCQoBZxgCIAEo",
 26          "AhIJCgFiGAMgASgCYgZwcm90bzM="));
 27    descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 28        new pbr::FileDescriptor[] { },
 29        new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 30          new pbr::GeneratedClrTypeInfo(typeof(global::Color3), global::Color3.Parser, new[]{ "R", "G", "B" }, null, nul
 31        }));
 32  }
 33  #endregion
 34
 35}
 36#region Messages
 37public sealed partial class Color3 : pb::IMessage<Color3>
 38#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 39    , pb::IBufferMessage
 40#endif
 41{
 142  private static readonly pb::MessageParser<Color3> _parser = new pb::MessageParser<Color3>(() => new Color3());
 43  private pb::UnknownFieldSet _unknownFields;
 44  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 45  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 046  public static pb::MessageParser<Color3> Parser { get { return _parser; } }
 47
 48  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 49  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 50  public static pbr::MessageDescriptor Descriptor {
 051    get { return global::Color3Reflection.Descriptor.MessageTypes[0]; }
 52  }
 53
 54  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 55  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 56  pbr::MessageDescriptor pb::IMessage.Descriptor {
 057    get { return Descriptor; }
 58  }
 59
 60  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 61  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 862  public Color3() {
 63    OnConstruction();
 864  }
 65
 66  partial void OnConstruction();
 67
 68  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 69  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 470  public Color3(Color3 other) : this() {
 471    r_ = other.r_;
 472    g_ = other.g_;
 473    b_ = other.b_;
 474    _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 475  }
 76
 77  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 78  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 79  public Color3 Clone() {
 080    return new Color3(this);
 81  }
 82
 83  /// <summary>Field number for the "r" field.</summary>
 84  public const int RFieldNumber = 1;
 85  private float r_;
 86  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 87  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 88  public float R {
 089    get { return r_; }
 90    set {
 891      r_ = value;
 892    }
 93  }
 94
 95  /// <summary>Field number for the "g" field.</summary>
 96  public const int GFieldNumber = 2;
 97  private float g_;
 98  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 99  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 100  public float G {
 0101    get { return g_; }
 102    set {
 8103      g_ = value;
 8104    }
 105  }
 106
 107  /// <summary>Field number for the "b" field.</summary>
 108  public const int BFieldNumber = 3;
 109  private float b_;
 110  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 111  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 112  public float B {
 0113    get { return b_; }
 114    set {
 8115      b_ = value;
 8116    }
 117  }
 118
 119  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 120  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 121  public override bool Equals(object other) {
 0122    return Equals(other as Color3);
 123  }
 124
 125  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 126  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 127  public bool Equals(Color3 other) {
 9128    if (ReferenceEquals(other, null)) {
 0129      return false;
 130    }
 9131    if (ReferenceEquals(other, this)) {
 0132      return true;
 133    }
 13134    if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(R, other.R)) return false;
 5135    if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(G, other.G)) return false;
 5136    if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(B, other.B)) return false;
 5137    return Equals(_unknownFields, other._unknownFields);
 138  }
 139
 140  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 141  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 142  public override int GetHashCode() {
 3143    int hash = 1;
 3144    if (R != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(R);
 3145    if (G != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(G);
 3146    if (B != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(B);
 3147    if (_unknownFields != null) {
 0148      hash ^= _unknownFields.GetHashCode();
 149    }
 3150    return hash;
 151  }
 152
 153  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 154  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 155  public override string ToString() {
 0156    return pb::JsonFormatter.ToDiagnosticString(this);
 157  }
 158
 159  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 160  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 161  public void WriteTo(pb::CodedOutputStream output) {
 162  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 163    output.WriteRawMessage(this);
 164  #else
 8165    if (R != 0F) {
 7166      output.WriteRawTag(13);
 7167      output.WriteFloat(R);
 168    }
 8169    if (G != 0F) {
 7170      output.WriteRawTag(21);
 7171      output.WriteFloat(G);
 172    }
 8173    if (B != 0F) {
 4174      output.WriteRawTag(29);
 4175      output.WriteFloat(B);
 176    }
 8177    if (_unknownFields != null) {
 0178      _unknownFields.WriteTo(output);
 179    }
 180  #endif
 8181  }
 182
 183  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 184  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 185  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 186  void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 187    if (R != 0F) {
 188      output.WriteRawTag(13);
 189      output.WriteFloat(R);
 190    }
 191    if (G != 0F) {
 192      output.WriteRawTag(21);
 193      output.WriteFloat(G);
 194    }
 195    if (B != 0F) {
 196      output.WriteRawTag(29);
 197      output.WriteFloat(B);
 198    }
 199    if (_unknownFields != null) {
 200      _unknownFields.WriteTo(ref output);
 201    }
 202  }
 203  #endif
 204
 205  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 206  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 207  public int CalculateSize() {
 16208    int size = 0;
 16209    if (R != 0F) {
 14210      size += 1 + 4;
 211    }
 16212    if (G != 0F) {
 14213      size += 1 + 4;
 214    }
 16215    if (B != 0F) {
 8216      size += 1 + 4;
 217    }
 16218    if (_unknownFields != null) {
 0219      size += _unknownFields.CalculateSize();
 220    }
 16221    return size;
 222  }
 223
 224  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 225  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 226  public void MergeFrom(Color3 other) {
 0227    if (other == null) {
 0228      return;
 229    }
 0230    if (other.R != 0F) {
 0231      R = other.R;
 232    }
 0233    if (other.G != 0F) {
 0234      G = other.G;
 235    }
 0236    if (other.B != 0F) {
 0237      B = other.B;
 238    }
 0239    _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0240  }
 241
 242  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 243  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 244  public void MergeFrom(pb::CodedInputStream input) {
 245  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 246    input.ReadRawMessage(this);
 247  #else
 248    uint tag;
 26249    while ((tag = input.ReadTag()) != 0) {
 250      switch(tag) {
 251        default:
 0252          _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0253          break;
 254        case 13: {
 7255          R = input.ReadFloat();
 7256          break;
 257        }
 258        case 21: {
 7259          G = input.ReadFloat();
 7260          break;
 261        }
 262        case 29: {
 4263          B = input.ReadFloat();
 264          break;
 265        }
 266      }
 267    }
 268  #endif
 8269  }
 270
 271  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 272  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 273  [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 274  void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 275    uint tag;
 276    while ((tag = input.ReadTag()) != 0) {
 277      switch(tag) {
 278        default:
 279          _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 280          break;
 281        case 13: {
 282          R = input.ReadFloat();
 283          break;
 284        }
 285        case 21: {
 286          G = input.ReadFloat();
 287          break;
 288        }
 289        case 29: {
 290          B = input.ReadFloat();
 291          break;
 292        }
 293      }
 294    }
 295  }
 296  #endif
 297
 298}
 299
 300#endregion
 301
 302
 303#endregion Designer generated code