ClaimContext¶
ClaimContext is the immutable value object that represents exactly one claim/worker binding for a ClaimAppManager. Because every property is read-only and the class exposes no mutators, changing context always means replacing the whole object rather than mutating it in place, which guarantees no manager can ever hold a partially-updated context (BR-CLM-002).
Purpose¶
- Carries the claim identity (claim id, claim number) or worker identity (worker id) that a manager is currently bound to.
- Records whether a context has actually been established (
ContextSet), distinguishing "no context yet" from "context set but claim not found."
Context¶
- Namespace:
SAIF.Application.Claim - Assembly/package:
SAIF.Application.Claim(embedded, ProjectReference)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
New() |
Public Sub New() |
Constructs a context that is not yet set. |
New(inClaimID, inWorkerID) |
Public Sub New(inClaimID As Decimal, inWorkerID As Decimal) |
Binds context to a claim id and worker id and marks the context as set. |
New(inClaimNumber) |
Public Sub New(inClaimNumber As String) |
Binds context to a SAIF claim number and marks the context as set. |
ContextSet |
Public ReadOnly Property As Boolean |
Indicates whether a claim or worker key has actually been bound to this context. |
ClaimID |
Public ReadOnly Property As Decimal |
The claim id bound to this context, or 0 when unset. |
ClaimNumber |
Public ReadOnly Property As String |
The SAIF claim number bound to this context, or blank when unset. |
WorkerID |
Public ReadOnly Property As Decimal |
The worker id bound to this context, or 0 when unset. |
Behavioral notes¶
- All properties are
ReadOnly; the only way to change what a manager is bound to is to construct and assign a newClaimContextinstance (BR-CLM-002). - This type carries no security or persistence logic — it is a pure identity value object consumed by
ClaimAppManager.SetClaimContext/SetWorkerContext.
Constraints and usage notes¶
- Consumers must not assume
ContextSet = Trueimplies a valid claim; validity is determined separately byClaimAppManager.OnContextChangedafter retrieval (BR-CLM-004).
Sources¶
SAIF.Application.Claim/ClaimContext.vb