Class NoExceptionsDecorator<TLinkAddress>
- Namespace
- Platform.Data.Doublets.Decorators
- Assembly
- Platform.Data.Doublets.dll
Returns the error constant when an operation throws.
public class NoExceptionsDecorator<TLinkAddress> : LinksDecoratorBase<TLinkAddress>, ILinks<TLinkAddress>, ILinks<TLinkAddress, LinksConstants<TLinkAddress>> where TLinkAddress : IUnsignedNumber<TLinkAddress>
Type Parameters
TLinkAddress
- Inheritance
-
LinksOperatorBase<TLinkAddress>LinksDecoratorBase<TLinkAddress>NoExceptionsDecorator<TLinkAddress>
- Implements
-
ILinks<TLinkAddress>ILinks<TLinkAddress, LinksConstants<TLinkAddress>>
- Inherited Members
- Extension Methods
Constructors
NoExceptionsDecorator(ILinks<TLinkAddress>)
Initializes the decorator with its underlying links.
public NoExceptionsDecorator(ILinks<TLinkAddress> storage)
Parameters
storageILinks<TLinkAddress>
Properties
ExceptionFilter
Optionally selects which exceptions are converted to the error constant. Null accepts all exceptions.
public Func<Exception, bool>? ExceptionFilter { get; set; }
Property Value
ExceptionHandler
Optionally observes converted exceptions for diagnostics. Null disables diagnostic callbacks.
public Action<Exception>? ExceptionHandler { get; set; }
Property Value
Methods
Count(IList<TLinkAddress>?)
Counts the restriction.
public override TLinkAddress Count(IList<TLinkAddress>? restriction)
Parameters
restrictionIList<TLinkAddress>The restriction.
Returns
- TLinkAddress
The link
Create(IList<TLinkAddress>?, WriteHandler<TLinkAddress>?)
Creates the restriction.
public override TLinkAddress Create(IList<TLinkAddress>? substitution, WriteHandler<TLinkAddress>? handler)
Parameters
substitutionIList<TLinkAddress>The restriction.
handlerWriteHandler<TLinkAddress>Optional callback; null continues without invoking a callback.
Returns
- TLinkAddress
The link
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