< Summary

Information
Class: Intentum.Runtime.Policy.ContextAwarePolicyRule
Assembly: Intentum.Runtime
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.Runtime/Policy/ContextAwarePolicyRule.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 14
Line coverage: 100%
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 Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%11100%

File(s)

/home/runner/work/Intentum/Intentum/src/Intentum.Runtime/Policy/ContextAwarePolicyRule.cs

#LineLine coverage
 1using Intentum.Core.Intents;
 2
 3namespace Intentum.Runtime.Policy;
 4
 5/// <summary>
 6/// A policy rule that evaluates both intent and context (e.g. system load, region).
 7/// </summary>
 8/// <param name="Name">Rule name for explainability.</param>
 9/// <param name="Condition">Condition over intent and policy context. First matching rule wins.</param>
 10/// <param name="Decision">Decision when the condition matches.</param>
 511public sealed record ContextAwarePolicyRule(
 312    string Name,
 313    Func<Intent, PolicyContext, bool> Condition,
 814    PolicyDecision Decision);