Class LinksInnerReferenceExistenceValidator<TLinkAddress>
- Namespace
- Platform.Data.Doublets.Decorators
- Assembly
- Platform.Data.Doublets.dll
Represents the links inner reference existence validator.
public class LinksInnerReferenceExistenceValidator<TLinkAddress> : LinksDecoratorBase<TLinkAddress>, ILinks<TLinkAddress>, ILinks<TLinkAddress, LinksConstants<TLinkAddress>> where TLinkAddress : IUnsignedNumber<TLinkAddress>
Type Parameters
TLinkAddress
- Inheritance
-
LinksOperatorBase<TLinkAddress>LinksDecoratorBase<TLinkAddress>LinksInnerReferenceExistenceValidator<TLinkAddress>
- Implements
-
ILinks<TLinkAddress>ILinks<TLinkAddress, LinksConstants<TLinkAddress>>
- Inherited Members
- Extension Methods
Remarks
Validates internal references in reads and both update argument lists, and checks deleted addresses. Place outside resolver layers to reject missing references before searches or mutations. Non-internal values are not validated as update addresses; callers must still supply a concrete internal update address.
Constructors
LinksInnerReferenceExistenceValidator(ILinks<TLinkAddress>)
Initializes a new LinksInnerReferenceExistenceValidator<TLinkAddress> instance.
public LinksInnerReferenceExistenceValidator(ILinks<TLinkAddress> links)
Parameters
linksILinks<TLinkAddress>A links.
Methods
Delete(IList<TLinkAddress>?, WriteHandler<TLinkAddress>?)
Deletes the restriction.
public override TLinkAddress Delete(IList<TLinkAddress>? restriction, WriteHandler<TLinkAddress>? handler)
Parameters
restrictionIList<TLinkAddress>The restriction.
handlerWriteHandler<TLinkAddress>Optional callback; null continues without invoking a callback.
Returns
- TLinkAddress
Each(IList<TLinkAddress>?, ReadHandler<TLinkAddress>?)
Eaches the handler.
public override TLinkAddress Each(IList<TLinkAddress>? restriction, ReadHandler<TLinkAddress>? handler)
Parameters
restrictionIList<TLinkAddress>The restriction.
handlerReadHandler<TLinkAddress>The handler.
Returns
- TLinkAddress
The link
Update(IList<TLinkAddress>?, IList<TLinkAddress>?, WriteHandler<TLinkAddress>?)
Updates the restriction.
public override TLinkAddress Update(IList<TLinkAddress>? restriction, IList<TLinkAddress>? substitution, WriteHandler<TLinkAddress>? handler)
Parameters
restrictionIList<TLinkAddress>The restriction.
substitutionIList<TLinkAddress>The substitution.
handlerWriteHandler<TLinkAddress>Optional callback; null continues without invoking a callback.
Returns
- TLinkAddress
The link