< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.GraphTopologyRegistration
Assembly: NexusLabs.Needlr.AgentFramework
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/GraphTopologyRegistration.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 17
Coverable lines: 17
Total lines: 49
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
get_EntryType()100%210%
get_RoutingMode()100%210%
get_Edges()100%210%
get_Nodes()100%210%
get_Reducer()100%210%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework/GraphTopologyRegistration.cs

#LineLine coverage
 1// Copyright (c) NexusLabs. All rights reserved.
 2// Licensed under the MIT License.
 3
 4namespace NexusLabs.Needlr.AgentFramework;
 5
 6/// <summary>
 7/// Compile-time graph topology data registered by the source generator.
 8/// Each instance captures the entry point, edges, nodes, and optional reducer
 9/// for one named graph.
 10/// </summary>
 11public sealed class GraphTopologyRegistration
 12{
 13    /// <summary>
 14    /// Initializes a new instance of <see cref="GraphTopologyRegistration"/>.
 15    /// </summary>
 16    /// <param name="entryType">The entry-point agent type for this graph, or <c>null</c> if none was declared.</param>
 17    /// <param name="routingMode">The graph-level routing mode (cast from <c>GraphRoutingMode</c>).</param>
 18    /// <param name="edges">All edges in this graph with source, target, optional condition, required flag, and optional
 19    /// <param name="nodes">All explicitly declared nodes with their join mode.</param>
 20    /// <param name="reducer">The reducer type and static method name, or <c>null</c> if no reducer was declared.</param
 021    public GraphTopologyRegistration(
 022        Type? entryType,
 023        int routingMode,
 024        IReadOnlyList<(Type Source, Type Target, string? Condition, bool IsRequired, int? NodeRoutingMode)> edges,
 025        IReadOnlyList<(Type NodeType, int JoinMode)> nodes,
 026        (Type ReducerType, string ReducerMethod)? reducer)
 27    {
 028        EntryType = entryType;
 029        RoutingMode = routingMode;
 030        Edges = edges;
 031        Nodes = nodes;
 032        Reducer = reducer;
 033    }
 34
 35    /// <summary>The entry-point agent type for this graph.</summary>
 036    public Type? EntryType { get; }
 37
 38    /// <summary>The graph-level routing mode as an integer (maps to <c>GraphRoutingMode</c>).</summary>
 039    public int RoutingMode { get; }
 40
 41    /// <summary>All declared edges: source agent type, target agent type, optional condition string, required flag, and
 042    public IReadOnlyList<(Type Source, Type Target, string? Condition, bool IsRequired, int? NodeRoutingMode)> Edges { g
 43
 44    /// <summary>All explicitly declared node join modes.</summary>
 045    public IReadOnlyList<(Type NodeType, int JoinMode)> Nodes { get; }
 46
 47    /// <summary>The reducer type and static method name, if declared.</summary>
 048    public (Type ReducerType, string ReducerMethod)? Reducer { get; }
 49}