Show / Hide Table of Contents

Class DownloadRetrievalMethod

Represents a retrieval method that downloads data from the net.

Inheritance
Object
XmlUnknown
FeedElement
RetrievalMethod
DownloadRetrievalMethod
Archive
SingleFile
Implements
IEquatable<XmlUnknown>
IEquatable<FeedElement>
ICloneable<RetrievalMethod>
IRecipeStep
ICloneable<IRecipeStep>
IEquatable<DownloadRetrievalMethod>
Inherited Members
RetrievalMethod.Clone()
FeedElement.FilterMismatch<T>(T)
FeedElement.FilterMismatch(IRecipeStep)
FeedElement.Equals(FeedElement)
FeedElement.IfZeroInstallVersion
FeedElement.IfZeroInstallVersionString
XmlUnknown.UnknownAttributes
XmlUnknown.UnknownElements
XmlUnknown.EnsureAttribute(Object, String)
XmlUnknown.EnsureAttributeSafeID(String, String)
XmlUnknown.ToShortXml()
XmlUnknown.Equals(XmlUnknown)
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public abstract class DownloadRetrievalMethod : RetrievalMethod, IRecipeStep

Constructors

DownloadRetrievalMethod()

Declaration
protected DownloadRetrievalMethod()

Properties

DownloadSize

The effective size of the file on the server.

Declaration
public virtual long DownloadSize { get; }
Property Value
Type Description
Int64

Href

The URL to download the file from. Relative URLs are only allowed in local feed files.

Declaration
public Uri Href { get; set; }
Property Value
Type Description
Uri

HrefString

Used for XML serialization and PropertyGrid.

Declaration
public string HrefString { get; set; }
Property Value
Type Description
String
See Also
Href

Size

The size of the file in bytes. The file must have the given size or it will be rejected.

Declaration
public long Size { get; set; }
Property Value
Type Description
Int64

Methods

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
FeedElement.Equals(Object)

Equals(DownloadRetrievalMethod)

Declaration
public bool Equals(DownloadRetrievalMethod other)
Parameters
Type Name Description
DownloadRetrievalMethod other
Returns
Type Description
Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
FeedElement.GetHashCode()

Normalize(FeedUri)

Sets missing default values and handles legacy elements.

Declaration
public override void Normalize(FeedUri feedUri = null)
Parameters
Type Name Description
FeedUri feedUri

The feed the data was originally loaded from.

Overrides
RetrievalMethod.Normalize(FeedUri)
Exceptions
Type Condition
UriFormatException

Href is relative and feedUri is a remote URI.

InvalidDataException

A required property is not set or invalid.

Operators

Equality(DownloadRetrievalMethod, DownloadRetrievalMethod)

Indicates whether the object on the left is equal to the object on the right.

Declaration
public static bool operator ==(DownloadRetrievalMethod left, DownloadRetrievalMethod right)
Parameters
Type Name Description
DownloadRetrievalMethod left

The left object

DownloadRetrievalMethod right

The right object

Returns
Type Description
Boolean

true if the objects are equal; otherwise, false.

Inequality(DownloadRetrievalMethod, DownloadRetrievalMethod)

Indicates whether the object on the left is not equal to the object on the right.

Declaration
public static bool operator !=(DownloadRetrievalMethod left, DownloadRetrievalMethod right)
Parameters
Type Name Description
DownloadRetrievalMethod left

The left object

DownloadRetrievalMethod right

The right object

Returns
Type Description
Boolean

true if the objects are not equal; otherwise, false.

Implements

System.IEquatable<T>
System.IEquatable<T>
ICloneable<T>
IRecipeStep
ICloneable<T>
System.IEquatable<T>

Extension Methods

RetrievalMethodExtensions.SetMissing(DownloadRetrievalMethod, ICommandExecutor, String)
RetrievalMethodExtensions.CalculateDigest(RetrievalMethod, ICommandExecutor, ITaskHandler, ManifestFormat)
RetrievalMethodExtensions.ToTempDir(DownloadRetrievalMethod, ITaskHandler, String)
In This Article
Back to top Copyright Bastian Eicher et al