< Summary

Class:Color3
Assembly:DCL.Components.ProtobufData
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ProtocolBuffers/Generated/PBFiles/Common/Color3.cs
Covered lines:44
Uncovered lines:36
Coverable lines:80
Total lines:225
Line coverage:55% (44 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%2100%
Clone()0%2100%
Equals(...)0%2100%
Equals(...)0%9.386054.55%
GetHashCode()0%6.65060%
ToString()0%2100%
WriteTo(...)0%5.395075%
CalculateSize()0%5.25080%
MergeFrom(...)0%30500%
MergeFrom(...)0%5.935066.67%

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> {
 138  private static readonly pb::MessageParser<Color3> _parser = new pb::MessageParser<Color3>(() => new Color3());
 39  private pb::UnknownFieldSet _unknownFields;
 40  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 041  public static pb::MessageParser<Color3> Parser { get { return _parser; } }
 42
 43  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 44  public static pbr::MessageDescriptor Descriptor {
 045    get { return global::Color3Reflection.Descriptor.MessageTypes[0]; }
 46  }
 47
 48  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 49  pbr::MessageDescriptor pb::IMessage.Descriptor {
 050    get { return Descriptor; }
 51  }
 52
 53  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 854  public Color3() {
 55    OnConstruction();
 856  }
 57
 58  partial void OnConstruction();
 59
 60  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 061  public Color3(Color3 other) : this() {
 062    r_ = other.r_;
 063    g_ = other.g_;
 064    b_ = other.b_;
 065    _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 066  }
 67
 68  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 69  public Color3 Clone() {
 070    return new Color3(this);
 71  }
 72
 73  /// <summary>Field number for the "r" field.</summary>
 74  public const int RFieldNumber = 1;
 75  private float r_;
 76  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 77  public float R {
 078    get { return r_; }
 79    set {
 880      r_ = value;
 881    }
 82  }
 83
 84  /// <summary>Field number for the "g" field.</summary>
 85  public const int GFieldNumber = 2;
 86  private float g_;
 87  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 88  public float G {
 089    get { return g_; }
 90    set {
 891      g_ = value;
 892    }
 93  }
 94
 95  /// <summary>Field number for the "b" field.</summary>
 96  public const int BFieldNumber = 3;
 97  private float b_;
 98  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 99  public float B {
 0100    get { return b_; }
 101    set {
 8102      b_ = value;
 8103    }
 104  }
 105
 106  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 107  public override bool Equals(object other) {
 0108    return Equals(other as Color3);
 109  }
 110
 111  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 112  public bool Equals(Color3 other) {
 1113    if (ReferenceEquals(other, null)) {
 0114      return false;
 115    }
 1116    if (ReferenceEquals(other, this)) {
 0117      return true;
 118    }
 1119    if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(R, other.R)) return false;
 1120    if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(G, other.G)) return false;
 1121    if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(B, other.B)) return false;
 1122    return Equals(_unknownFields, other._unknownFields);
 123  }
 124
 125  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 126  public override int GetHashCode() {
 3127    int hash = 1;
 3128    if (R != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(R);
 3129    if (G != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(G);
 3130    if (B != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(B);
 3131    if (_unknownFields != null) {
 0132      hash ^= _unknownFields.GetHashCode();
 133    }
 3134    return hash;
 135  }
 136
 137  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 138  public override string ToString() {
 0139    return pb::JsonFormatter.ToDiagnosticString(this);
 140  }
 141
 142  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 143  public void WriteTo(pb::CodedOutputStream output) {
 4144    if (R != 0F) {
 3145      output.WriteRawTag(13);
 3146      output.WriteFloat(R);
 147    }
 4148    if (G != 0F) {
 3149      output.WriteRawTag(21);
 3150      output.WriteFloat(G);
 151    }
 4152    if (B != 0F) {
 0153      output.WriteRawTag(29);
 0154      output.WriteFloat(B);
 155    }
 4156    if (_unknownFields != null) {
 0157      _unknownFields.WriteTo(output);
 158    }
 4159  }
 160
 161  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 162  public int CalculateSize() {
 8163    int size = 0;
 8164    if (R != 0F) {
 6165      size += 1 + 4;
 166    }
 8167    if (G != 0F) {
 6168      size += 1 + 4;
 169    }
 8170    if (B != 0F) {
 0171      size += 1 + 4;
 172    }
 8173    if (_unknownFields != null) {
 0174      size += _unknownFields.CalculateSize();
 175    }
 8176    return size;
 177  }
 178
 179  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 180  public void MergeFrom(Color3 other) {
 0181    if (other == null) {
 0182      return;
 183    }
 0184    if (other.R != 0F) {
 0185      R = other.R;
 186    }
 0187    if (other.G != 0F) {
 0188      G = other.G;
 189    }
 0190    if (other.B != 0F) {
 0191      B = other.B;
 192    }
 0193    _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0194  }
 195
 196  [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 197  public void MergeFrom(pb::CodedInputStream input) {
 198    uint tag;
 10199    while ((tag = input.ReadTag()) != 0) {
 200      switch(tag) {
 201        default:
 0202          _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 0203          break;
 204        case 13: {
 3205          R = input.ReadFloat();
 3206          break;
 207        }
 208        case 21: {
 3209          G = input.ReadFloat();
 3210          break;
 211        }
 212        case 29: {
 0213          B = input.ReadFloat();
 214          break;
 215        }
 216      }
 217    }
 4218  }
 219
 220}
 221
 222#endregion
 223
 224
 225#endregion Designer generated code