Class SingleFile
Retrieves an implementation by downloading a single file.
Implements
Inherited Members
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class SingleFile : DownloadRetrievalMethod, IRecipeStep
Constructors
SingleFile()
Declaration
public SingleFile()
Properties
Destination
The file's target path relative to the implementation root as a Unix-style path.
Declaration
public string Destination { get; set; }
Property Value
Type | Description |
---|---|
String |
Executable
Set this to true
to mark the file as executable.
Declaration
public bool Executable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Clone()
Creates a deep copy of this SingleFile instance.
Declaration
public override RetrievalMethod Clone()
Returns
Type | Description |
---|---|
RetrievalMethod | The new copy of the SingleFile. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(SingleFile)
Declaration
public bool Equals(SingleFile other)
Parameters
Type | Name | Description |
---|---|---|
SingleFile | 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. |
ToString()
Returns the file in the form "Location (Size) => Destination". Not safe for parsing!
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
Equality(SingleFile, SingleFile)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(SingleFile left, SingleFile right)
Parameters
Type | Name | Description |
---|---|---|
SingleFile | left | The left object |
SingleFile | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(SingleFile, SingleFile)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(SingleFile left, SingleFile right)
Parameters
Type | Name | Description |
---|---|---|
SingleFile | left | The left object |
SingleFile | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |