< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Generators.GraphEntryPointEntry
Assembly: NexusLabs.Needlr.AgentFramework.Generators
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Generators/Models/GraphEntryPointEntry.cs
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 54
Line coverage: 100%
Branch coverage
71%
Covered branches: 10
Total branches: 14
Branch coverage: 71.4%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_AgentTypeName()100%11100%
get_AgentClassName()100%11100%
get_GraphName()100%11100%
get_RoutingMode()100%11100%
Equals(...)100%66100%
Equals(...)50%22100%
GetHashCode()50%66100%
op_Equality(...)100%11100%
op_Inequality(...)100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Generators/Models/GraphEntryPointEntry.cs

#LineLine coverage
 1// Copyright (c) NexusLabs. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5
 6namespace NexusLabs.Needlr.AgentFramework.Generators;
 7
 8internal readonly struct GraphEntryPointEntry : IEquatable<GraphEntryPointEntry>
 9{
 10    public GraphEntryPointEntry(
 11        string agentTypeName,
 12        string agentClassName,
 13        string graphName,
 14        int routingMode)
 15    {
 2916        AgentTypeName = agentTypeName;
 2917        AgentClassName = agentClassName;
 2918        GraphName = graphName;
 2919        RoutingMode = routingMode;
 2920    }
 21
 7922    public string AgentTypeName { get; }
 2223    public string AgentClassName { get; }
 6024    public string GraphName { get; }
 3525    public int RoutingMode { get; }
 26
 27    public bool Equals(GraphEntryPointEntry other) =>
 728        string.Equals(AgentTypeName, other.AgentTypeName, StringComparison.Ordinal) &&
 729        string.Equals(AgentClassName, other.AgentClassName, StringComparison.Ordinal) &&
 730        string.Equals(GraphName, other.GraphName, StringComparison.Ordinal) &&
 731        RoutingMode == other.RoutingMode;
 32
 33    public override bool Equals(object? obj) =>
 134        obj is GraphEntryPointEntry other && Equals(other);
 35
 36    public override int GetHashCode()
 37    {
 38        unchecked
 39        {
 240            var hash = 17;
 241            hash = hash * 31 + (AgentTypeName?.GetHashCode() ?? 0);
 242            hash = hash * 31 + (AgentClassName?.GetHashCode() ?? 0);
 243            hash = hash * 31 + (GraphName?.GetHashCode() ?? 0);
 244            hash = hash * 31 + RoutingMode.GetHashCode();
 245            return hash;
 46        }
 47    }
 48
 49    public static bool operator ==(GraphEntryPointEntry left, GraphEntryPointEntry right) =>
 150        left.Equals(right);
 51
 52    public static bool operator !=(GraphEntryPointEntry left, GraphEntryPointEntry right) =>
 253        !left.Equals(right);
 54}