Class NamedTypesDecorator<TLinkAddress>
- Namespace
- Foundation.Data.Doublets.Cli
- Assembly
- Foundation.Data.Doublets.Cli.dll
public class NamedTypesDecorator<TLinkAddress> : LinksDecoratorBase<TLinkAddress>, INamedTypesLinks<TLinkAddress>, ILinks<TLinkAddress>, ILinks<TLinkAddress, LinksConstants<TLinkAddress>>, INamedTypes<TLinkAddress>, IPinnedTypes<TLinkAddress>, IEnumerable<TLinkAddress>, IEnumerable, 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>NamedTypesDecorator<TLinkAddress>
- Implements
-
INamedTypesLinks<TLinkAddress>ILinks<TLinkAddress>ILinks<TLinkAddress, LinksConstants<TLinkAddress>>INamedTypes<TLinkAddress>IPinnedTypes<TLinkAddress>IEnumerable<TLinkAddress>
- Inherited Members
-
LinksDecoratorBase<TLinkAddress>._constantsLinksDecoratorBase<TLinkAddress>._facadeLinksDecoratorBase<TLinkAddress>.FacadeLinksDecoratorBase<TLinkAddress>.ConstantsLinksOperatorBase<TLinkAddress>._linksLinksOperatorBase<TLinkAddress>.Links
- Extension Methods
Constructors
NamedTypesDecorator(PinnedTypesDecorator<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 NamedTypesDecorator(PinnedTypesDecorator<TLinkAddress> pinnedTypesDecorator, string namesDatabaseFilename, bool tracingEnabled = false)
Parameters
pinnedTypesDecoratorPinnedTypesDecorator<TLinkAddress>namesDatabaseFilenamestringtracingEnabledbool
NamedTypesDecorator(ILinks<TLinkAddress>, string, bool)
public NamedTypesDecorator(ILinks<TLinkAddress> links, string namesDatabaseFilename, bool tracingEnabled = false)
Parameters
NamedTypesDecorator(string, bool)
public NamedTypesDecorator(string databaseFilename, bool tracingEnabled = false)
Parameters
Fields
NamedLinks
public readonly NamedLinks<TLinkAddress> NamedLinks
Field Value
- NamedLinks<TLinkAddress>
NamedLinksDatabaseFileName
public readonly string NamedLinksDatabaseFileName
Field Value
PinnedTypesDecorator
public readonly PinnedTypesDecorator<TLinkAddress> PinnedTypesDecorator
Field Value
- PinnedTypesDecorator<TLinkAddress>
Methods
Deconstruct(out TLinkAddress, out TLinkAddress, out TLinkAddress)
public virtual void Deconstruct(out TLinkAddress type1, out TLinkAddress type2, out TLinkAddress type3)
Parameters
type1TLinkAddresstype2TLinkAddresstype3TLinkAddress
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()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases the names database this decorator owns. Derived decorators
that own extra resources override this and call
base.Dispose(disposing).
protected virtual void Dispose(bool disposing)
Parameters
disposingbool
GetByName(string)
public virtual TLinkAddress GetByName(string name)
Parameters
namestring
Returns
- TLinkAddress
GetEnumerator()
Returns an enumerator that iterates through the collection.
public virtual IEnumerator<TLinkAddress> GetEnumerator()
Returns
- IEnumerator<TLinkAddress>
An enumerator that can be used to iterate through the collection.
GetName(TLinkAddress)
public virtual string? GetName(TLinkAddress link)
Parameters
linkTLinkAddress
Returns
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
Returns
RemoveName(TLinkAddress)
public virtual void RemoveName(TLinkAddress link)
Parameters
linkTLinkAddress
SetName(TLinkAddress, string)
public virtual TLinkAddress SetName(TLinkAddress link, string name)
Parameters
linkTLinkAddressnamestring
Returns
- TLinkAddress
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>
Returns
- TLinkAddress
The link