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
-
CacheNode
- Implements
- Derived
- Inherited Members
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?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
Equals(CacheNode?)
Indicates whether the current object is equal to another object of the same type.
public abstract bool Equals(CacheNode? other)
Parameters
other
CacheNodeAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Remove(IFeedCache?, IImplementationStore?)
Removes this element from the cache it is stored in.
public abstract void Remove(IFeedCache? feedCache = null, IImplementationStore? implementationStore = null)
Parameters
feedCache
IFeedCacheimplementationStore
IImplementationStore
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()