Interface ILibrarySyncPolicy
- Namespace
- EncDotNet.S100.Collections.Library
- Assembly
- EncDotNet.S100.Collections.dll
The per-kind rules LibrarySync keeps a source in sync by: whether the source is synced, which of its items should have a current local copy, and where its copies live and when they may be pruned. The sync itself (downloading, the size cap, safe pruning, settling) is the same for every kind.
public interface ILibrarySyncPolicy
Methods
CanPrune(SourceIndex)
True when index lists everything the source offers
now (complete and fresh), so copies it does not list may be pruned.
bool CanPrune(SourceIndex index)
Parameters
indexSourceIndex
Returns
IsSynced(CollectionSource)
True when this policy keeps source in sync: it supports it and Sync is on.
bool IsSynced(CollectionSource source)
Parameters
sourceCollectionSource
Returns
PruneFolder(CollectionSource, SourceIndex)
A download location of the managed folder the source's copies live in, so copies no source lists any more can be pruned there; null when the source never prunes.
RemoteItemLocation? PruneFolder(CollectionSource source, SourceIndex index)
Parameters
sourceCollectionSourceindexSourceIndex
Returns
Supports(CollectionSource)
True when this policy can keep source's kind in sync (whether or not it is asked to).
bool Supports(CollectionSource source)
Parameters
sourceCollectionSource
Returns
Wanted(SourceIndex)
The items of index that should have a current local copy.
IReadOnlyList<CollectionItem> Wanted(SourceIndex index)
Parameters
indexSourceIndex