Class CacheNode
- Namespace
- ZeroInstall.Store.ViewModel
- Assembly
- ZeroInstall.Store.dll
Models information about elements in a cache for display in a UI.
public abstract class CacheNode : INamed, IEquatable<CacheNode>
- Inheritance
-
objectCacheNode
- Implements
- Derived
Constructors
CacheNode(string, long)
Models information about elements in a cache for display in a UI.
protected CacheNode(string path, long size)
Parameters
Properties
Name
The full name of the node used for tree hierarchies.
[Browsable(false)]
public abstract string Name { get; set; }
Property Value
Path
The path of the directory.
public string Path { get; }
Property Value
Size
The total size of the directory in bytes.
[Browsable(false)]
public long Size { get; }
Property Value
SizeHuman
The total size of the directory in human-readable form.
public string SizeHuman { get; }
Property Value
SuffixCounter
A counter that can be used to prevent naming collisions.
[Browsable(false)]
public int SuffixCounter { get; }
Property Value
Remarks
If this value is not zero it is appended to the Name.
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(CacheNode?)
public abstract bool Equals(CacheNode? other)
Parameters
otherCacheNode
Returns
GetHashCode()
public override int GetHashCode()
Returns
Remove(IFeedCache?, IImplementationStore?)
Removes this element from the cache it is stored in.
public abstract void Remove(IFeedCache? feedCache = null, IImplementationStore? implementationStore = null)
Parameters
feedCacheIFeedCacheimplementationStoreIImplementationStore
Exceptions
- OperationCanceledException
The user canceled the task.
- KeyNotFoundException
No matching element could be found in the cache.
- IOException
The element could not be deleted.
- UnauthorizedAccessException
Write access to the cache is not permitted.
ToString()
Creates string representation suitable for console output.
public override string ToString()