Class CopyFromStep
Copies files or directories from another implementation specified elsewhere in the same feed.
Implements
Inherited Members
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class CopyFromStep : FeedElement, IRecipeStep
Constructors
CopyFromStep()
Declaration
public CopyFromStep()
Properties
Destination
The destination file or directory relative to the implementation root as a Unix-style path; null
for top-level. Must be set if Source points to a file.
Declaration
public string Destination { get; set; }
Property Value
Type | Description |
---|---|
String |
ID
The ID of the Implementation to copy from.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
String |
Implementation
Used to hold the Implementation the ID references after Normalize(FeedUri) has been executed.
Declaration
public Implementation Implementation { get; set; }
Property Value
Type | Description |
---|---|
Implementation |
Source
The source file or directory relative to the source implementation root as a Unix-style path; null
or Empty for entire implementation.
Declaration
public string Source { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
Clone()
Creates a deep copy of this CopyFromStep instance.
Declaration
public IRecipeStep Clone()
Returns
Type | Description |
---|---|
IRecipeStep | The new copy of the CopyFromStep. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(CopyFromStep)
Declaration
public bool Equals(CopyFromStep other)
Parameters
Type | Name | Description |
---|---|---|
CopyFromStep | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Normalize(FeedUri)
Converts legacy elements, sets default values, etc..
Declaration
public void Normalize(FeedUri feedUri = null)
Parameters
Type | Name | Description |
---|---|---|
FeedUri | feedUri | The feed the data was originally loaded from. |
Exceptions
Type | Condition |
---|---|
UriFormatException | Href is relative and |
ToString()
Returns the copy-from step in the form "Copy from ID (Source => Destination)". Not safe for parsing!
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
Equality(CopyFromStep, CopyFromStep)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(CopyFromStep left, CopyFromStep right)
Parameters
Type | Name | Description |
---|---|---|
CopyFromStep | left | The left object |
CopyFromStep | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(CopyFromStep, CopyFromStep)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(CopyFromStep left, CopyFromStep right)
Parameters
Type | Name | Description |
---|---|---|
CopyFromStep | left | The left object |
CopyFromStep | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |