Table of Contents

Class ForEachArgs

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

Expands an environment variable to multiple arguments. The variable specified in ItemFrom is split using Separator and the Arguments are added once for each item.

[Serializable]
[Equatable]
public class ForEachArgs : ArgBase, IEquatable<XmlUnknown>, IEquatable<FeedElement>, ICloneable<ArgBase>, IEquatable<ForEachArgs>
Inheritance
ForEachArgs
Implements
Inherited Members

Properties

Arguments

A list of command-line arguments to be passed to an executable. "${item}" will be substituted with each for-each value.

[Browsable(false)]
[OrderedEquality]
public List<Arg> Arguments { get; }

Property Value

List<Arg>

ItemFrom

The name of the environment variable to be expanded.

public required string ItemFrom { get; set; }

Property Value

string

Separator

Overrides the default separator character (":" on POSIX and ";" on Windows).

public string? Separator { get; set; }

Property Value

string

Methods

Clone()

Creates a deep copy of this ForEachArgs instance.

public override ArgBase Clone()

Returns

ArgBase

The new copy of the ForEachArgs.

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.

Equals(ForEachArgs?)

protected bool Equals(ForEachArgs? other)

Parameters

other ForEachArgs

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Normalize()

Converts legacy elements, sets default values, etc..

public override void Normalize()

Exceptions

InvalidDataException

A required property is not set or invalid.

ToString()

Returns the for-each instruction in the form "ItemFrom". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(ForEachArgs?, ForEachArgs?)

Indicates whether the object on the left is equal to the object on the right.

public static bool operator ==(ForEachArgs? left, ForEachArgs? right)

Parameters

left ForEachArgs

The left object

right ForEachArgs

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(ForEachArgs?, ForEachArgs?)

Indicates whether the object on the left is not equal to the object on the right.

public static bool operator !=(ForEachArgs? left, ForEachArgs? right)

Parameters

left ForEachArgs

The left object

right ForEachArgs

The right object

Returns

bool

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