< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Generators.AgentFunctionParameterInfo
Assembly: NexusLabs.Needlr.AgentFramework.Generators
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Generators/Models/AgentFunctionParameterInfo.cs
Line coverage
100%
Covered lines: 18
Uncovered lines: 0
Coverable lines: 18
Total lines: 39
Line coverage: 100%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
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_Name()100%11100%
get_TypeFullName()100%11100%
get_JsonSchemaType()100%11100%
get_ItemJsonSchemaType()100%11100%
get_ItemObjectSchemaJson()100%11100%
get_ItemObjectProperties()100%11100%
get_IsCancellationToken()100%11100%
get_IsNullable()100%11100%
get_HasDefault()100%11100%
get_Description()100%11100%
get_IsRequired()50%44100%

File(s)

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

#LineLine coverage
 1// Copyright (c) NexusLabs. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5
 6namespace NexusLabs.Needlr.AgentFramework.Generators;
 7
 8internal readonly struct AgentFunctionParameterInfo
 9{
 10    public AgentFunctionParameterInfo(
 11        string name, string typeFullName,
 12        string jsonSchemaType, string? itemJsonSchemaType,
 13        string? itemObjectSchemaJson,
 14        IReadOnlyList<ObjectPropertyInfo>? itemObjectProperties,
 15        bool isCancellationToken, bool isNullable, bool hasDefault, string? description)
 16    {
 3417        Name = name; TypeFullName = typeFullName;
 3418        JsonSchemaType = jsonSchemaType; ItemJsonSchemaType = itemJsonSchemaType;
 1719        ItemObjectSchemaJson = itemObjectSchemaJson;
 1720        ItemObjectProperties = itemObjectProperties;
 3421        IsCancellationToken = isCancellationToken; IsNullable = isNullable;
 3422        HasDefault = hasDefault; Description = description;
 1723    }
 24
 13625    public string Name { get; }
 1726    public string TypeFullName { get; }
 7227    public string JsonSchemaType { get; }
 28    /// <summary>JSON schema type for array items (e.g., "string", "integer", "object").</summary>
 1129    public string? ItemJsonSchemaType { get; }
 30    /// <summary>Pre-built JSON schema for complex object array items (properties, required fields).</summary>
 631    public string? ItemObjectSchemaJson { get; }
 32    /// <summary>Property extraction info for AOT-safe manual deserialization of complex array items.</summary>
 633    public IReadOnlyList<ObjectPropertyInfo>? ItemObjectProperties { get; }
 6734    public bool IsCancellationToken { get; }
 1635    public bool IsNullable { get; }
 1636    public bool HasDefault { get; }
 2137    public string? Description { get; }
 1638    public bool IsRequired => !IsCancellationToken && !IsNullable && !HasDefault;
 39}