Class DownloadRetrievalMethod
- Namespace
- ZeroInstall.Model
- Assembly
- ZeroInstall.Model.dll
Represents a retrieval method that downloads data from the net.
[Equatable]
public abstract class DownloadRetrievalMethod : RetrievalMethod, IEquatable<XmlUnknown>, IEquatable<FeedElement>, ICloneable<RetrievalMethod>, IRecipeStep, ICloneable<IRecipeStep>, IEquatable<DownloadRetrievalMethod>
- Inheritance
-
DownloadRetrievalMethod
- Implements
- Derived
- Inherited Members
Properties
DownloadSize
The effective size of the file on the server.
[Browsable(false)]
public virtual long DownloadSize { get; }
Property Value
Href
The URL to download the file from. Relative URLs are only allowed in local feed files.
[Browsable(false)]
public required Uri Href { get; set; }
Property Value
Size
The size of the file in bytes. The file must have the given size or it will be rejected.
public long Size { get; set; }
Property Value
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(DownloadRetrievalMethod?)
protected bool Equals(DownloadRetrievalMethod? other)
Parameters
other
DownloadRetrievalMethod
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Normalize(FeedUri?)
Sets missing default values and handles legacy elements.
public override void Normalize(FeedUri? feedUri = null)
Parameters
feedUri
FeedUriThe feed the data was originally loaded from.
Exceptions
- UriFormatException
Href is relative and
feedUri
is a remote URI.- InvalidDataException
A required property is not set or invalid.
Operators
operator ==(DownloadRetrievalMethod?, DownloadRetrievalMethod?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(DownloadRetrievalMethod? left, DownloadRetrievalMethod? right)
Parameters
left
DownloadRetrievalMethodThe left object
right
DownloadRetrievalMethodThe right object
Returns
- bool
true if the objects are equal; otherwise, false.
operator !=(DownloadRetrievalMethod?, DownloadRetrievalMethod?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(DownloadRetrievalMethod? left, DownloadRetrievalMethod? right)
Parameters
left
DownloadRetrievalMethodThe left object
right
DownloadRetrievalMethodThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.