Table of Contents

Class SimpleLinksDecorator<TLinkAddress>

Namespace
Foundation.Data.Doublets.Cli
Assembly
Foundation.Data.Doublets.Cli.dll
public class SimpleLinksDecorator<TLinkAddress> : LinksDecoratorBase<TLinkAddress>, ILinks<TLinkAddress>, ILinks<TLinkAddress, LinksConstants<TLinkAddress>>, IDisposable where TLinkAddress : struct, IUnsignedNumber<TLinkAddress>, IComparisonOperators<TLinkAddress, TLinkAddress, bool>, IShiftOperators<TLinkAddress, int, TLinkAddress>, IBitwiseOperators<TLinkAddress, TLinkAddress, TLinkAddress>, IMinMaxValue<TLinkAddress>

Type Parameters

TLinkAddress
Inheritance
LinksOperatorBase<TLinkAddress>
LinksDecoratorBase<TLinkAddress>
SimpleLinksDecorator<TLinkAddress>
Implements
ILinks<TLinkAddress>
ILinks<TLinkAddress, LinksConstants<TLinkAddress>>
Inherited Members
LinksDecoratorBase<TLinkAddress>._constants
LinksDecoratorBase<TLinkAddress>._facade
LinksDecoratorBase<TLinkAddress>.Facade
LinksDecoratorBase<TLinkAddress>.Constants
LinksOperatorBase<TLinkAddress>._links
LinksOperatorBase<TLinkAddress>.Links
Extension Methods

Constructors

[SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", Justification = "The names database memory and links are owned by this instance and released by Dispose.")]
public SimpleLinksDecorator(ILinks<TLinkAddress> links, string namesDatabaseFilename, bool tracingEnabled = false)

Parameters

links ILinks<TLinkAddress>
namesDatabaseFilename string
tracingEnabled bool

SimpleLinksDecorator(string, bool)

public SimpleLinksDecorator(string databaseFilename, bool tracingEnabled = false)

Parameters

databaseFilename string
tracingEnabled bool

Fields

public readonly NamedLinks<TLinkAddress> NamedLinks

Field Value

NamedLinks<TLinkAddress>

NamedLinksDatabaseFileName

public readonly string NamedLinksDatabaseFileName

Field Value

string

Methods

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>

Returns

TLinkAddress

Dispose()

Releases the memory-mapped file handles of both the data and the names databases.

public void Dispose()

Dispose(bool)

Releases the databases this decorator owns. Derived decorators that own extra resources override this and call base.Dispose(disposing).

protected virtual void Dispose(bool disposing)

Parameters

disposing bool
[SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", Justification = "Ownership of the links facade is transferred to the caller, which releases it through Dispose.")]
public static ILinks<TLinkAddress> MakeLinks(string databaseFilename)

Parameters

databaseFilename string

Returns

ILinks<TLinkAddress>

MakeNamesDatabaseFilename(string)

public static string MakeNamesDatabaseFilename(string databaseFilename)

Parameters

databaseFilename string

Returns

string