Class CompositeImplementationSink
- Namespace
- ZeroInstall.Store.Implementations
- Assembly
- ZeroInstall.Store.dll
Combines multiple IImplementationSinks as a composite.
public class CompositeImplementationSink : MarshalNoTimeout, IImplementationSink
- Inheritance
-
CompositeImplementationSink
- Implements
- Derived
- Inherited Members
Remarks
When adding new Implementations the last child IImplementationSink that doesn't throw an UnauthorizedAccessException is used.
Constructors
CompositeImplementationSink(IReadOnlyList<IImplementationSink>)
Combines multiple IImplementationSinks as a composite.
public CompositeImplementationSink(IReadOnlyList<IImplementationSink> sinks)
Parameters
sinks
IReadOnlyList<IImplementationSink>A priority-sorted list of IImplementationSinks. Queried last-to-first for adding new Implementation.
Remarks
When adding new Implementations the last child IImplementationSink that doesn't throw an UnauthorizedAccessException is used.
Methods
Add(ManifestDigest, Action<IBuilder>)
Adds a new implementation.
public void Add(ManifestDigest manifestDigest, Action<IBuilder> build)
Parameters
manifestDigest
ManifestDigestThe digest the implementation is supposed to match.
build
Action<IBuilder>Callback for building the implementation.
Exceptions
- OperationCanceledException
The user canceled the task.
- ImplementationAlreadyInStoreException
There is already an implementation with the specified
manifestDigest
in the store.- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.
- DigestMismatchException
The implementation's content doesn't match the
manifestDigest
.
Contains(ManifestDigest)
Determines whether the sink/store contains an implementation identified by a specific ManifestDigest.
public bool Contains(ManifestDigest manifestDigest)
Parameters
manifestDigest
ManifestDigestThe digest of the implementation to check for.
Returns
- bool
true
if the specified implementation is available in the store;false
if the specified implementation is not available in the store or if read access to the store is not permitted.
Remarks
If read access to the store is not permitted, no exception is thrown.