DuplicatePolicy Enum
Definition
- Namespace
- Bodu.Globalization.Calendar.RangeResolution
- Assembly
- Bodu.Globalization.Calendar.dll
- Package
- Bodu.Globalization.Calendar 1.0.1
- Source
- DuplicatePolicy.cs
Determines how the loader treats two rules that resolve to the same full identity within a resource graph.
public enum DuplicatePolicy
- Extension Methods
Fields
Error = 0Report a duplicate identity as a validation error.
KeepFirst = 1Keep the first rule encountered and discard later duplicates.
KeepLast = 2Keep the last rule encountered and discard earlier duplicates.
Merge = 3Merge duplicate rules into a single rule.
Remarks
The recommended default is Error, which surfaces accidental rule collapse rather than hiding it.
// The same concept emitted twice for one day (for example by overlapping rules):
// KeepFirst drops the later duplicate, Error fails the resolve. Set via the policy:
NotableDateDocumentBuilder.Create("demo")
.WithResolutionPolicy(p => p.WithDuplicatePolicy(DuplicatePolicy.KeepFirst));
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |