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

Initializes the decorator with its underlying links.

public NoExceptionsDecorator(ILinks<TLinkAddress> storage)

Parameters

storage ILinks<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

Func<Exception, bool>

ExceptionHandler

Optionally observes converted exceptions for diagnostics. Null disables diagnostic callbacks.

public Action<Exception>? ExceptionHandler { get; set; }

Property Value

Action<Exception>

Methods

Count(IList<TLinkAddress>?)

Counts the restriction.

public override TLinkAddress Count(IList<TLinkAddress>? restriction)

Parameters

restriction IList<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

substitution IList<TLinkAddress>

The restriction.

handler WriteHandler<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

restriction IList<TLinkAddress>

The restriction.

handler WriteHandler<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

restriction IList<TLinkAddress>

The restriction.

handler ReadHandler<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

restriction IList<TLinkAddress>

The restriction.

substitution IList<TLinkAddress>

The substitution.

handler WriteHandler<TLinkAddress>

Optional callback; null continues without invoking a callback.

Returns

TLinkAddress

The link