AdjustmentTriggerHandlerRegistry Class
Definition
- Namespace
- Bodu.Globalization.Calendar
- Assembly
- Bodu.Globalization.Calendar.dll
- Package
- Bodu.Globalization.Calendar 1.0.1
A mutable registry of custom IAdjustmentTriggerHandler implementations keyed by handler key.
public sealed class AdjustmentTriggerHandlerRegistry : IAdjustmentTriggerHandlerRegistry
- Inheritance
-
AdjustmentTriggerHandlerRegistry
- Implements
- Inherited Members
- Extension Methods
Remarks
Keys are matched ordinally and are case-sensitive. Registering a key that is already present replaces the previous handler.
Constructors
AdjustmentTriggerHandlerRegistry()
public AdjustmentTriggerHandlerRegistry()
Methods
Contains(string)
Determines whether a handler is registered under the supplied key.
public bool Contains(string key)
Parameters
keystringThe handler key.
Returns
Exceptions
- ArgumentNullException
keyis null.
Register(string, IAdjustmentTriggerHandler)
Registers a handler under a key, replacing any existing registration.
public AdjustmentTriggerHandlerRegistry Register(string key, IAdjustmentTriggerHandler handler)
Parameters
keystringThe handler key the policy references.
handlerIAdjustmentTriggerHandlerThe handler implementation.
Returns
- AdjustmentTriggerHandlerRegistry
The same registry, to allow chaining.
Exceptions
- ArgumentNullException
keyorhandleris null.
TryGet(string, out IAdjustmentTriggerHandler?)
Attempts to retrieve the handler registered under the supplied key.
public bool TryGet(string key, out IAdjustmentTriggerHandler? handler)
Parameters
keystringThe handler key.
handlerIAdjustmentTriggerHandlerWhen this method returns, the registered handler, or null when none.
Returns
Exceptions
- ArgumentNullException
keyis null.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |