< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Generators.Models.AsyncLocalScopedInfo
Assembly: NexusLabs.Needlr.AgentFramework.Generators
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Generators/Models/AsyncLocalScopedInfo.cs
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 59
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_InterfaceFullName()100%11100%
get_InterfaceName()100%11100%
get_NamespaceName()100%11100%
get_ValueTypeFullName()100%11100%
get_ScopeMethodName()100%11100%
get_HasScopeParameter()100%11100%
get_ScopeParameterTypeFullName()100%11100%
get_IsMutable()100%11100%
get_ProxyProperties()100%11100%
get_GeneratedClassName()50%44100%

File(s)

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

#LineLine coverage
 1using System;
 2using System.Collections.Immutable;
 3
 4namespace NexusLabs.Needlr.AgentFramework.Generators.Models
 5{
 6    /// <summary>
 7    /// Discovered metadata for an interface decorated with [AsyncLocalScoped].
 8    /// </summary>
 9    internal readonly struct AsyncLocalScopedInfo
 10    {
 11        public AsyncLocalScopedInfo(
 12            string interfaceFullName,
 13            string interfaceName,
 14            string namespaceName,
 15            string valueTypeFullName,
 16            string scopeMethodName,
 17            bool hasScopeParameter,
 18            string scopeParameterTypeFullName,
 19            bool isMutable,
 20            ImmutableArray<AsyncLocalScopedPropertyInfo> proxyProperties)
 21        {
 822            InterfaceFullName = interfaceFullName;
 823            InterfaceName = interfaceName;
 824            NamespaceName = namespaceName;
 825            ValueTypeFullName = valueTypeFullName;
 826            ScopeMethodName = scopeMethodName;
 827            HasScopeParameter = hasScopeParameter;
 828            ScopeParameterTypeFullName = scopeParameterTypeFullName;
 829            IsMutable = isMutable;
 830            ProxyProperties = proxyProperties;
 831        }
 32
 1633        public string InterfaceFullName { get; }
 3234        public string InterfaceName { get; }
 2435        public string NamespaceName { get; }
 836        public string ValueTypeFullName { get; }
 837        public string ScopeMethodName { get; }
 838        public bool HasScopeParameter { get; }
 639        public string ScopeParameterTypeFullName { get; }
 840        public bool IsMutable { get; }
 41
 42        /// <summary>
 43        /// Properties on the accessor interface (beyond <c>Current</c>) that
 44        /// should be proxied through to <c>Current?.PropertyName</c>.
 45        /// Empty when the interface declares no extra properties.
 46        /// </summary>
 1247        public ImmutableArray<AsyncLocalScopedPropertyInfo> ProxyProperties { get; }
 48
 49        public string GeneratedClassName
 50        {
 51            get
 52            {
 853                return InterfaceName.StartsWith("I", StringComparison.Ordinal) && InterfaceName.Length > 1
 854                    ? InterfaceName.Substring(1)
 855                    : InterfaceName + "Impl";
 56            }
 57        }
 58    }
 59}