Table of Contents

Class SecomTrustRefresh

Namespace
EncDotNet.S100.Collections.Library
Assembly
EncDotNet.S100.Collections.dll

Reads SECOM sources again when what they present, or were refused for, may have changed (#880, #883):

  • the default identity changes: the sources set to Default;
  • an identity is added, replaced or removed: the sources that resolve to it (set to it, or following the default when it is the default);
  • the trusted authorities change: the sources whose server certificate was not trusted.

A change to one source's own Identity reads that source only, as any UpdateSource(Guid, CollectionSource) does.

public sealed class SecomTrustRefresh : IDisposable
Inheritance
SecomTrustRefresh
Implements
Inherited Members

Remarks

Hosts create one per Library and keep it for its lifetime. It listens to IdentitiesChanged and AnchorsChanged, which may be raised on any thread; Refresh(Guid?, Guid?) is safe to call from any.

Constructors

SecomTrustRefresh(CollectionLibrary, SecomServerTrust)

Starts refreshing library's SECOM sources when trust changes.

public SecomTrustRefresh(CollectionLibrary library, SecomServerTrust trust)

Parameters

library CollectionLibrary
trust SecomServerTrust

Methods

Affected(SecomIdentitiesChangedEventArgs)

The SECOM sources an identity change affects (see the class remarks).

public IReadOnlyList<(Guid CollectionId, Guid SourceId)> Affected(SecomIdentitiesChangedEventArgs change)

Parameters

change SecomIdentitiesChangedEventArgs

Returns

IReadOnlyList<(Guid CollectionId, Guid SourceId)>

Affected(Func<string, bool>)

The SECOM sources whose last read failed with a SecomDiagnosticCodes code that matches.

public IReadOnlyList<(Guid CollectionId, Guid SourceId)> Affected(Func<string, bool> matches)

Parameters

matches Func<string, bool>

Returns

IReadOnlyList<(Guid CollectionId, Guid SourceId)>

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()