< Summary

Class:Configs.SwarmConfig
Assembly:bamlab.micromissiles
File(s):/github/workspace/Assets/Scripts/Generated/Proto/SwarmConfig.cs
Covered lines:27
Uncovered lines:83
Coverable lines:110
Total lines:298
Line coverage:24.5% (27 of 110)
Covered branches:0
Total branches:0
Covered methods:8
Total methods:21
Method coverage:38% (8 of 21)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SwarmConfig()0%110100%
get_Descriptor()0%2100%
SwarmConfig()0%110100%
SwarmConfig(...)0%12300%
Clone()0%2100%
Equals(...)0%2100%
Equals(...)0%30500%
GetHashCode()0%20400%
ToString()0%2100%
WriteTo(...)0%2100%
InternalWriteTo(...)0%20400%
CalculateSize()0%20400%
MergeFrom(...)0%30500%
MergeFrom(...)0%2100%
InternalMergeFrom(...)0%6.256080.95%

File(s)

/github/workspace/Assets/Scripts/Generated/Proto/SwarmConfig.cs

#LineLine coverage
 1// <auto-generated>
 2//     Generated by the protocol buffer compiler.  DO NOT EDIT!
 3//     source: Configs/swarm_config.proto
 4// </auto-generated>
 5#pragma warning disable 1591, 0612, 3021, 8981
 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 Configs {
 13
 14  /// <summary>Holder for reflection information generated from Configs/swarm_config.proto</summary>
 15  public static partial class SwarmConfigReflection {
 16
 17    #region Descriptor
 18    /// <summary>File descriptor for Configs/swarm_config.proto</summary>
 19    public static pbr::FileDescriptor Descriptor {
 20      get { return descriptor; }
 21    }
 22    private static pbr::FileDescriptor descriptor;
 23
 24    static SwarmConfigReflection() {
 25      byte[] descriptorData = global::System.Convert.FromBase64String(
 26          string.Concat(
 27            "ChpDb25maWdzL3N3YXJtX2NvbmZpZy5wcm90bxIHY29uZmlncxoaQ29uZmln",
 28            "cy9hZ2VudF9jb25maWcucHJvdG8iTQoLU3dhcm1Db25maWcSEgoKbnVtX2Fn",
 29            "ZW50cxgBIAEoDRIqCgxhZ2VudF9jb25maWcYAiABKAsyFC5jb25maWdzLkFn",
 30            "ZW50Q29uZmlnYgZwcm90bzM="));
 31      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
 32          new pbr::FileDescriptor[] { global::Configs.AgentConfigReflection.Descriptor, },
 33          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
 34            new pbr::GeneratedClrTypeInfo(typeof(global::Configs.SwarmConfig), global::Configs.SwarmConfig.Parser, new[]
 35          }));
 36    }
 37    #endregion
 38
 39  }
 40  #region Messages
 41  /// <summary>
 42  /// Swarm configuration.
 43  /// </summary>
 44  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
 45  public sealed partial class SwarmConfig : pb::IMessage<SwarmConfig>
 46  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 47      , pb::IBufferMessage
 48  #endif
 49  {
 4350    private static readonly pb::MessageParser<SwarmConfig> _parser = new pb::MessageParser<SwarmConfig>(() => new SwarmC
 51    private pb::UnknownFieldSet _unknownFields;
 52    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 53    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 654    public static pb::MessageParser<SwarmConfig> Parser { get { return _parser; } }
 55
 56    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 57    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 58    public static pbr::MessageDescriptor Descriptor {
 059      get { return global::Configs.SwarmConfigReflection.Descriptor.MessageTypes[0]; }
 60    }
 61
 62    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 63    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 64    pbr::MessageDescriptor pb::IMessage.Descriptor {
 065      get { return Descriptor; }
 66    }
 67
 68    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 69    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 8470    public SwarmConfig() {
 71      OnConstruction();
 4272    }
 73
 74    partial void OnConstruction();
 75
 76    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 77    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 078    public SwarmConfig(SwarmConfig other) : this() {
 079      numAgents_ = other.numAgents_;
 080      agentConfig_ = other.agentConfig_ != null ? other.agentConfig_.Clone() : null;
 081      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
 082    }
 83
 84    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 85    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 086    public SwarmConfig Clone() {
 087      return new SwarmConfig(this);
 088    }
 89
 90    /// <summary>Field number for the "num_agents" field.</summary>
 91    public const int NumAgentsFieldNumber = 1;
 92    private uint numAgents_;
 93    /// <summary>
 94    /// Number of agents.
 95    /// </summary>
 96    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 97    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 98    public uint NumAgents {
 236199      get { return numAgents_; }
 32100      set {
 32101        numAgents_ = value;
 32102      }
 103    }
 104
 105    /// <summary>Field number for the "agent_config" field.</summary>
 106    public const int AgentConfigFieldNumber = 2;
 107    private global::Configs.AgentConfig agentConfig_;
 108    /// <summary>
 109    /// Agent configuration.
 110    /// </summary>
 111    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 112    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 113    public global::Configs.AgentConfig AgentConfig {
 2391114      get { return agentConfig_; }
 42115      set {
 42116        agentConfig_ = value;
 42117      }
 118    }
 119
 120    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 121    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0122    public override bool Equals(object other) {
 0123      return Equals(other as SwarmConfig);
 0124    }
 125
 126    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 127    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0128    public bool Equals(SwarmConfig other) {
 0129      if (ReferenceEquals(other, null)) {
 0130        return false;
 131      }
 0132      if (ReferenceEquals(other, this)) {
 0133        return true;
 134      }
 0135      if (NumAgents != other.NumAgents) return false;
 0136      if (!object.Equals(AgentConfig, other.AgentConfig)) return false;
 0137      return Equals(_unknownFields, other._unknownFields);
 0138    }
 139
 140    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 141    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0142    public override int GetHashCode() {
 0143      int hash = 1;
 0144      if (NumAgents != 0) hash ^= NumAgents.GetHashCode();
 0145      if (agentConfig_ != null) hash ^= AgentConfig.GetHashCode();
 0146      if (_unknownFields != null) {
 0147        hash ^= _unknownFields.GetHashCode();
 0148      }
 0149      return hash;
 0150    }
 151
 152    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 153    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0154    public override string ToString() {
 0155      return pb::JsonFormatter.ToDiagnosticString(this);
 0156    }
 157
 158    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 159    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0160    public void WriteTo(pb::CodedOutputStream output) {
 161    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 0162      output.WriteRawMessage(this);
 163    #else
 164      if (NumAgents != 0) {
 165        output.WriteRawTag(8);
 166        output.WriteUInt32(NumAgents);
 167      }
 168      if (agentConfig_ != null) {
 169        output.WriteRawTag(18);
 170        output.WriteMessage(AgentConfig);
 171      }
 172      if (_unknownFields != null) {
 173        _unknownFields.WriteTo(output);
 174      }
 175    #endif
 0176    }
 177
 178    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 179    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 180    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0181    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
 0182      if (NumAgents != 0) {
 0183        output.WriteRawTag(8);
 0184        output.WriteUInt32(NumAgents);
 0185      }
 0186      if (agentConfig_ != null) {
 0187        output.WriteRawTag(18);
 0188        output.WriteMessage(AgentConfig);
 0189      }
 0190      if (_unknownFields != null) {
 0191        _unknownFields.WriteTo(ref output);
 0192      }
 0193    }
 194    #endif
 195
 196    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 197    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0198    public int CalculateSize() {
 0199      int size = 0;
 0200      if (NumAgents != 0) {
 0201        size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumAgents);
 0202      }
 0203      if (agentConfig_ != null) {
 0204        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AgentConfig);
 0205      }
 0206      if (_unknownFields != null) {
 0207        size += _unknownFields.CalculateSize();
 0208      }
 0209      return size;
 0210    }
 211
 212    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 213    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0214    public void MergeFrom(SwarmConfig other) {
 0215      if (other == null) {
 0216        return;
 217      }
 0218      if (other.NumAgents != 0) {
 0219        NumAgents = other.NumAgents;
 0220      }
 0221      if (other.agentConfig_ != null) {
 0222        if (agentConfig_ == null) {
 0223          AgentConfig = new global::Configs.AgentConfig();
 0224        }
 0225        AgentConfig.MergeFrom(other.AgentConfig);
 0226      }
 0227      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 0228    }
 229
 230    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 231    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 0232    public void MergeFrom(pb::CodedInputStream input) {
 233    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 0234      input.ReadRawMessage(this);
 235    #else
 236      uint tag;
 237      while ((tag = input.ReadTag()) != 0) {
 238      if ((tag & 7) == 4) {
 239        // Abort on any end group tag.
 240        return;
 241      }
 242      switch(tag) {
 243          default:
 244            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
 245            break;
 246          case 8: {
 247            NumAgents = input.ReadUInt32();
 248            break;
 249          }
 250          case 18: {
 251            if (agentConfig_ == null) {
 252              AgentConfig = new global::Configs.AgentConfig();
 253            }
 254            input.ReadMessage(AgentConfig);
 255            break;
 256          }
 257        }
 258      }
 259    #endif
 0260    }
 261
 262    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
 263    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
 264    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
 42265    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
 266      uint tag;
 190267      while ((tag = input.ReadTag()) != 0) {
 74268      if ((tag & 7) == 4) {
 269        // Abort on any end group tag.
 0270        return;
 271      }
 74272      switch(tag) {
 273          default:
 0274            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
 0275            break;
 32276          case 8: {
 32277            NumAgents = input.ReadUInt32();
 32278            break;
 279          }
 42280          case 18: {
 84281            if (agentConfig_ == null) {
 42282              AgentConfig = new global::Configs.AgentConfig();
 42283            }
 42284            input.ReadMessage(AgentConfig);
 42285            break;
 286          }
 287        }
 74288      }
 42289    }
 290    #endif
 291
 292  }
 293
 294  #endregion
 295
 296}
 297
 298#endregion Designer generated code