Table of Contents

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

string

ID

The ID of the Implementation to copy from.

public string? ID { get; set; }

Property Value

string

Implementation

Used to hold the Implementation the ID references after Normalize(FeedUri?) has been executed.

[Browsable(false)]
public Implementation? Implementation { get; set; }

Property Value

Implementation

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

string

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 object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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 FeedUri

The 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

string

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 CopyFromStep

The left object

right CopyFromStep

The 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 CopyFromStep

The left object

right CopyFromStep

The right object

Returns

bool

true if the objects are not equal; otherwise, false.