Zero Install .NET API 2.20.0
ZeroInstall.Store.Implementations.CompositeImplementationStore Class Reference

Combines multiple IImplementationStores as a composite. More...

Inheritance diagram for ZeroInstall.Store.Implementations.CompositeImplementationStore:
ZeroInstall.Store.Implementations.IImplementationStore ZeroInstall.Store.Implementations.IImplementationSink

Public Member Functions

 CompositeImplementationStore (IEnumerable< IImplementationStore > innerStores)
 Creates a new composite implementation store with a set of IImplementationStores. More...
 
void Add (ManifestDigest manifestDigest, Action< IBuilder > build)
 Adds a new implementation. More...
 
bool Contains (ManifestDigest manifestDigest)
 Determines whether the store contains a local copy of an implementation identified by a specific ManifestDigest. More...
 
string? GetPath (ManifestDigest manifestDigest)
 Determines the local path of an implementation with a given ManifestDigest. More...
 
IEnumerable< ManifestDigestListAll ()
 Returns a list of all implementations currently in the store. More...
 
IEnumerable< string > ListAllTemp ()
 Returns a list of temporary directories currently in the store. More...
 
void Verify (ManifestDigest manifestDigest, ITaskHandler handler)
 Checks whether an implementation in the store still matches the expected digest. Asks the user whether to delete the implementation if it does not match. More...
 
bool Remove (ManifestDigest manifestDigest, ITaskHandler handler)
 Removes a specific implementation from the cache. More...
 
long Optimise (ITaskHandler handler)
 Reads in all the manifest files in the store and looks for duplicates (files with the same permissions, modification time and digest). When it finds a pair, it deletes one and replaces it with a hard-link to the other. More...
 
override string ToString ()
 Creates string representation suitable for console output.
 

Properties

IEnumerable< IImplementationStoreStores [get]
 The IImplementationStores this store is internally composed of.
 
ImplementationStoreKind Kind [get]
 
string Path [get]
 
- Properties inherited from ZeroInstall.Store.Implementations.IImplementationStore
ImplementationStoreKind Kind [get]
 Indicates what kind of access to this store is possible.
 
string Path [get]
 The path to the underlying directory in the file system.
 

Detailed Description

Combines multiple IImplementationStores as a composite.

When adding new Implementations the last child IImplementationStore that doesn't throw an UnauthorizedAccessException is used.

When when retrieving existing Implementations the first child IImplementationStore that returns true for IImplementationStore.Contains(ManifestDigest) is used.

Constructor & Destructor Documentation

◆ CompositeImplementationStore()

ZeroInstall.Store.Implementations.CompositeImplementationStore.CompositeImplementationStore ( IEnumerable< IImplementationStore innerStores)
inline

Creates a new composite implementation store with a set of IImplementationStores.

Parameters
innerStoresA priority-sorted list of IImplementationStores. Queried last-to-first for adding new Implementations, first-to-last otherwise.

Member Function Documentation

◆ Add()

void ZeroInstall.Store.Implementations.CompositeImplementationStore.Add ( ManifestDigest  manifestDigest,
Action< IBuilder build 
)
inline

Adds a new implementation.

Implements ZeroInstall.Store.Implementations.IImplementationSink.

◆ Contains()

bool ZeroInstall.Store.Implementations.CompositeImplementationStore.Contains ( ManifestDigest  manifestDigest)

Determines whether the store contains a local copy of an implementation identified by a specific ManifestDigest.

Implements ZeroInstall.Store.Implementations.IImplementationStore.

◆ GetPath()

string? ZeroInstall.Store.Implementations.CompositeImplementationStore.GetPath ( ManifestDigest  manifestDigest)

Determines the local path of an implementation with a given ManifestDigest.

Implements ZeroInstall.Store.Implementations.IImplementationStore.

◆ ListAll()

IEnumerable< ManifestDigest > ZeroInstall.Store.Implementations.CompositeImplementationStore.ListAll ( )

Returns a list of all implementations currently in the store.

Implements ZeroInstall.Store.Implementations.IImplementationStore.

◆ ListAllTemp()

IEnumerable< string > ZeroInstall.Store.Implementations.CompositeImplementationStore.ListAllTemp ( )

Returns a list of temporary directories currently in the store.

Implements ZeroInstall.Store.Implementations.IImplementationStore.

◆ Optimise()

long ZeroInstall.Store.Implementations.CompositeImplementationStore.Optimise ( ITaskHandler  handler)
inline

Reads in all the manifest files in the store and looks for duplicates (files with the same permissions, modification time and digest). When it finds a pair, it deletes one and replaces it with a hard-link to the other.

Implements ZeroInstall.Store.Implementations.IImplementationStore.

◆ Remove()

bool ZeroInstall.Store.Implementations.CompositeImplementationStore.Remove ( ManifestDigest  manifestDigest,
ITaskHandler  handler 
)
inline

Removes a specific implementation from the cache.

Implements ZeroInstall.Store.Implementations.IImplementationStore.

◆ Verify()

void ZeroInstall.Store.Implementations.CompositeImplementationStore.Verify ( ManifestDigest  manifestDigest,
ITaskHandler  handler 
)
inline

Checks whether an implementation in the store still matches the expected digest. Asks the user whether to delete the implementation if it does not match.

Implements ZeroInstall.Store.Implementations.IImplementationStore.


The documentation for this class was generated from the following file: