Method TryTakeRecompileAsync
- Namespace
- IntentSharp.ChangeDetection
- Assembly
- IntentSharp.dll
TryTakeRecompileAsync(string, string, CancellationToken)
Takes one automatic recompile of the rule set set for the target target
under environment.maxRecompilesPerHour (three by default; 0 never recompiles automatically,
unlimited always does). Returns false when the set has used them all in the past hour; then leave the set
as it is and report it with ReportPending(string, string?). The count is kept in the document store's state, so
every process that shares the store shares it. A recompile taken here and not reported pending by the time the
handlers finished counts as done: the set is no longer pending for that target.
public ValueTask<bool> TryTakeRecompileAsync(string target, string set, CancellationToken ct = default)
Parameters
targetstringThe target the set's rules are written for.
setstringThe rule set to recompile.
ctCancellationTokenCancels the call.
Returns
- ValueTask<bool>
Exceptions
- ArgumentNullException
targetorsetis null.- ArgumentException
targetorsetis empty.