Class SynchronizedLinks<TLinkAddress>

Namespace
Platform.Data.Doublets
Assembly
Platform.Data.Doublets.dll

Synchronizes access to an underlying link store.

public class SynchronizedLinks<TLinkAddress> : ISynchronizedLinks<TLinkAddress>, ISynchronizedLinks<TLinkAddress, ILinks<TLinkAddress>, LinksConstants<TLinkAddress>>, ISynchronized<ILinks<TLinkAddress>>, ILinks<TLinkAddress>, ILinks<TLinkAddress, LinksConstants<TLinkAddress>> where TLinkAddress : IUnsignedNumber<TLinkAddress>

Type Parameters

TLinkAddress
Inheritance
SynchronizedLinks<TLinkAddress>
Implements
ISynchronizedLinks<TLinkAddress>
ISynchronizedLinks<TLinkAddress, ILinks<TLinkAddress>, LinksConstants<TLinkAddress>>
ISynchronized<ILinks<TLinkAddress>>
ILinks<TLinkAddress>
ILinks<TLinkAddress, LinksConstants<TLinkAddress>>
Inherited Members
Extension Methods

TODO: Autogeneration of synchronized wrapper (decorator). TODO: Try to unfold code of each method using IL generation for performance improvements. TODO: Or even to unfold multiple layers of implementations.

Constructors

Initializes a new SynchronizedLinks<TLinkAddress> instance.

public SynchronizedLinks(ILinks<TLinkAddress> links)

Parameters

links ILinks<TLinkAddress>

A links.

Initializes a new SynchronizedLinks<TLinkAddress> instance.

public SynchronizedLinks(ISynchronization synchronization, ILinks<TLinkAddress> links)

Parameters

synchronization ISynchronization

A synchronization.

links ILinks<TLinkAddress>

A links.

Properties

Gets the constants value.

public LinksConstants<TLinkAddress> Constants { get; }

Property Value

LinksConstants<TLinkAddress>

Gets the sync value.

public ILinks<TLinkAddress> Sync { get; }

Property Value

ILinks<TLinkAddress>

Gets the sync root value.

public ISynchronization SyncRoot { get; }

Property Value

ISynchronization

Gets the unsync value.

public ILinks<TLinkAddress> Unsync { get; }

Property Value

ILinks<TLinkAddress>

Methods

Counts the restriction.

public TLinkAddress Count(IList<TLinkAddress>? restriction)

Parameters

restriction IList<TLinkAddress>

The restriction.

Returns

TLinkAddress

The link address

Creates the substitution.

public TLinkAddress Create(IList<TLinkAddress>? substitution, WriteHandler<TLinkAddress>? handler)

Parameters

substitution IList<TLinkAddress>

The substitution.

handler WriteHandler<TLinkAddress>

Optional callback; null continues without invoking a callback.

Returns

TLinkAddress

The link address

Deletes the substitution.

public TLinkAddress Delete(IList<TLinkAddress>? restriction, WriteHandler<TLinkAddress>? handler)

Parameters

restriction IList<TLinkAddress>

The substitution.

handler WriteHandler<TLinkAddress>

Optional callback; null continues without invoking a callback.

Returns

TLinkAddress

Eaches the handler.

public TLinkAddress Each(IList<TLinkAddress>? restriction, ReadHandler<TLinkAddress>? handler)

Parameters

restriction IList<TLinkAddress>

The substitution.

handler ReadHandler<TLinkAddress>

The handler.

Returns

TLinkAddress

The link address

Updates the substitution.

public TLinkAddress Update(IList<TLinkAddress>? restriction, IList<TLinkAddress>? substitution, WriteHandler<TLinkAddress>? handler)

Parameters

restriction IList<TLinkAddress>

The substitution.

substitution IList<TLinkAddress>

The substitution.

handler WriteHandler<TLinkAddress>

Optional callback; null continues without invoking a callback.

Returns

TLinkAddress

The link address