AdjustmentTriggerContext Class
Definition
- Namespace
- Bodu.Globalization.Calendar
- Assembly
- Bodu.Globalization.Calendar.dll
- Package
- Bodu.Globalization.Calendar 1.0.1
Provides an IAdjustmentTriggerHandler with the information needed to decide whether a policy fires: the calculated occurrence date, the requesting territory, the candidate policy, and access to the surrounding resolution context.
public sealed class AdjustmentTriggerContext
- Inheritance
-
AdjustmentTriggerContext
- Inherited Members
- Extension Methods
Remarks
Trigger evaluation runs during candidate gathering, before placement, so no occupied-day probe is exposed: the set of claimed non-working days is still being assembled and would be unreliable. Handlers that need to reason about other occurrences should resolve them through ResolutionContext.
Constructors
AdjustmentTriggerContext(DateOnly, string, AdjustmentPolicy, StrategyResolutionContext)
Initializes a new instance of the AdjustmentTriggerContext class.
public AdjustmentTriggerContext(DateOnly baseDate, string territory, AdjustmentPolicy policy, StrategyResolutionContext resolutionContext)
Parameters
baseDateDateOnlyThe calculated (actual) occurrence date.
territorystringThe territory code the resolution was requested for.
policyAdjustmentPolicyThe adjustment policy whose custom trigger is being evaluated.
resolutionContextStrategyResolutionContextThe resolution context used to resolve referenced rules.
Exceptions
- ArgumentNullException
territory,policy, orresolutionContextis null.
Properties
BaseDate
Gets the calculated (actual) occurrence date being evaluated.
public DateOnly BaseDate { get; }
Property Value
- DateOnly
The calculated date.
Parameters
Gets the author-supplied parameters declared by the policy.
public IReadOnlyDictionary<string, string> Parameters { get; }
Property Value
- IReadOnlyDictionary<string, string>
The policy's HandlerParameters; empty when none are declared.
Policy
Gets the adjustment policy whose custom trigger is being evaluated.
public AdjustmentPolicy Policy { get; }
Property Value
- AdjustmentPolicy
The candidate AdjustmentPolicy.
ResolutionContext
Gets the resolution context the handler can use to resolve referenced rules for the same year.
public StrategyResolutionContext ResolutionContext { get; }
Property Value
Territory
Gets the territory code the resolution was requested for.
public string Territory { get; }
Property Value
- string
The requested territory code.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |