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
ItemFrom
The name of the environment variable to be expanded.
public required string ItemFrom { get; set; }
Property Value
Separator
Overrides the default separator character (":" on POSIX and ";" on Windows).
public string? Separator { get; set; }
Property Value
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
objectThe object to compare with the current object.
Returns
Equals(ForEachArgs?)
protected bool Equals(ForEachArgs? other)
Parameters
other
ForEachArgs
Returns
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
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
ForEachArgsThe left object
right
ForEachArgsThe 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
ForEachArgsThe left object
right
ForEachArgsThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.