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>._constantsLinksDecoratorBase<TLinkAddress>._facadeLinksDecoratorBase<TLinkAddress>.FacadeLinksDecoratorBase<TLinkAddress>.ConstantsLinksOperatorBase<TLinkAddress>._linksLinksOperatorBase<TLinkAddress>.Links
- Extension Methods
Constructors
SimpleLinksDecorator(ILinks<TLinkAddress>, string, bool)
[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
SimpleLinksDecorator(string, bool)
public SimpleLinksDecorator(string databaseFilename, bool tracingEnabled = false)
Parameters
Fields
NamedLinks
public readonly NamedLinks<TLinkAddress> NamedLinks
Field Value
- NamedLinks<TLinkAddress>
NamedLinksDatabaseFileName
public readonly string NamedLinksDatabaseFileName
Field Value
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>
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
disposingbool
MakeLinks(string)
[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
databaseFilenamestring
Returns
- ILinks<TLinkAddress>
MakeNamesDatabaseFilename(string)
public static string MakeNamesDatabaseFilename(string databaseFilename)
Parameters
databaseFilenamestring