Class CopyFromStep
- Namespace
- ZeroInstall.Model
- Assembly
- ZeroInstall.Model.dll
Copies files or directories from another implementation specified elsewhere in the same feed.
[Serializable]
[Equatable]
public sealed class CopyFromStep : FeedElement, IEquatable<XmlUnknown>, IEquatable<FeedElement>, IRecipeStep, ICloneable<IRecipeStep>, IEquatable<CopyFromStep>
- Inheritance
-
CopyFromStep
- Implements
- Inherited Members
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.
public string? Destination { get; set; }
Property Value
ID
The ID of the Implementation to copy from.
public string? ID { get; set; }
Property Value
Implementation
Used to hold the Implementation the ID references after Normalize(FeedUri?) has been executed.
[Browsable(false)]
public Implementation? Implementation { get; set; }
Property Value
Source
The source file or directory relative to the source implementation root as a Unix-style path; null
or Empty for entire implementation.
public string? Source { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this CopyFromStep instance.
public IRecipeStep Clone()
Returns
- IRecipeStep
The new copy of the CopyFromStep.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
Normalize(FeedUri?)
Converts legacy elements, sets default values, etc..
public void Normalize(FeedUri? feedUri = null)
Parameters
feedUri
FeedUriThe feed the data was originally loaded from.
Exceptions
- UriFormatException
Href is relative and
feedUri
is a remote URI.
ToString()
Returns the copy-from step in the form "Copy from ID (Source => Destination)". Not safe for parsing!
public override string ToString()
Returns
Operators
operator ==(CopyFromStep?, CopyFromStep?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(CopyFromStep? left, CopyFromStep? right)
Parameters
left
CopyFromStepThe left object
right
CopyFromStepThe right object
Returns
- bool
true if the objects are equal; otherwise, false.
operator !=(CopyFromStep?, CopyFromStep?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(CopyFromStep? left, CopyFromStep? right)
Parameters
left
CopyFromStepThe left object
right
CopyFromStepThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.