Show / Hide Table of Contents

Class SingleFile

Retrieves an implementation by downloading a single file.

Inheritance
Object
XmlUnknown
FeedElement
RetrievalMethod
DownloadRetrievalMethod
SingleFile
Implements
IEquatable<XmlUnknown>
IEquatable<FeedElement>
ICloneable<RetrievalMethod>
IRecipeStep
ICloneable<IRecipeStep>
IEquatable<DownloadRetrievalMethod>
IEquatable<SingleFile>
Inherited Members
DownloadRetrievalMethod.Equals(DownloadRetrievalMethod)
DownloadRetrievalMethod.Href
DownloadRetrievalMethod.HrefString
DownloadRetrievalMethod.Size
DownloadRetrievalMethod.DownloadSize
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 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
RetrievalMethod.Clone()

Equals(Object)

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

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
DownloadRetrievalMethod.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
DownloadRetrievalMethod.Normalize(FeedUri)
Exceptions
Type Condition
UriFormatException

Href is relative and feedUri is a remote URI.

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.

Implements

System.IEquatable<T>
System.IEquatable<T>
ICloneable<T>
IRecipeStep
ICloneable<T>
System.IEquatable<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