PhoenixmlDb.Core

XIncludeLimiter

Enforces XInclude expansion resource limits (descent depth, produced-node budget) and carries the xpath1() evaluation timeout. One instance is created per call and threaded through every recursive path, so a bound cannot be silently skipped on one path (the root cause of the resource-safety audit findings). Single-threaded; not reusable.

#XIncludeLimiter

Namespace: PhoenixmlDb.Core.Xml

Enforces XInclude expansion resource limits (descent depth, produced-node budget) and carries the xpath1() evaluation timeout. One instance is created per call and threaded through every recursive path, so a bound cannot be silently skipped on one path (the root cause of the resource-safety audit findings). Single-threaded; not reusable.

#Properties

Name Description
NodeBudgetEnabled Whether the produced-node budget is active. Lets callers skip the (O(subtree)) node count entirely when the budget is disabled, so <= 0 is truly free.
XPathTimeoutMs The per-xpath1() wall-clock budget in ms (<= 0 = unlimited).

#Methods

#ConsumeNodes(Int64)

Charges produced nodes against the budget; throws fatal on breach.

#EnterExpansion

Increments the descent depth; throws fatal past the cap.

#ExitExpansion

Decrements the descent depth. Call in a finally paired with .