Class ForEachArgs
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.
Implements
Inherited Members
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public class ForEachArgs : ArgBase
Constructors
ForEachArgs()
Declaration
public ForEachArgs()
Properties
Arguments
A list of command-line arguments to be passed to an executable. "${item}" will be substituted with each for-each value.
Declaration
public List<Arg> Arguments { get; }
Property Value
Type | Description |
---|---|
List<Arg> |
ItemFrom
The name of the environment variable to be expanded.
Declaration
public string ItemFrom { get; set; }
Property Value
Type | Description |
---|---|
String |
Separator
Overrides the default separator character (":" on POSIX and ";" on Windows).
Declaration
public string Separator { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
Clone()
Creates a deep copy of this ForEachArgs instance.
Declaration
public override ArgBase Clone()
Returns
Type | Description |
---|---|
ArgBase | The new copy of the ForEachArgs. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(ForEachArgs)
Declaration
public bool Equals(ForEachArgs other)
Parameters
Type | Name | Description |
---|---|---|
ForEachArgs | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Normalize()
Converts legacy elements, sets default values, etc..
Declaration
public override void Normalize()
Overrides
Exceptions
Type | Condition |
---|---|
InvalidDataException | A required property is not set or invalid. |
ToString()
Returns the for-each instruction in the form "ItemFrom". Not safe for parsing!
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
Equality(ForEachArgs, ForEachArgs)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(ForEachArgs left, ForEachArgs right)
Parameters
Type | Name | Description |
---|---|---|
ForEachArgs | left | The left object |
ForEachArgs | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(ForEachArgs, ForEachArgs)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(ForEachArgs left, ForEachArgs right)
Parameters
Type | Name | Description |
---|---|---|
ForEachArgs | left | The left object |
ForEachArgs | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |