Class DownloadRetrievalMethod
Represents a retrieval method that downloads data from the net.
Inheritance
Implements
Inherited Members
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
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
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
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
Exceptions
Type | Condition |
---|---|
UriFormatException | Href is relative and |
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. |