Table of Contents

Class Arg

Namespace
ZeroInstall.Model
Assembly
ZeroInstall.Model.dll

A single command-line arguments to be passed to an executable.

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

Properties

Value

A single command-line arguments to be passed to an executable. Will be automatically escaped to allow proper concatenation of multiple arguments containing spaces.

public required string Value { get; set; }

Property Value

string

Methods

Clone()

Creates a deep copy of this instance.

public override ArgBase Clone()

Returns

ArgBase

CloneArg()

Creates a deep copy of this Arg instance.

public Arg CloneArg()

Returns

Arg

The new copy of the Arg.

CloneFromTo(Arg, Arg)

Copies all members declared by Arg from one instance to another.

protected static void CloneFromTo(Arg from, Arg to)

Parameters

from Arg
to Arg

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(Arg?)

protected bool Equals(Arg? other)

Parameters

other Arg

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 Value. Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(Arg?, Arg?)

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

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

Parameters

left Arg

The left object

right Arg

The right object

Returns

bool

true if the objects are equal; otherwise, false.

implicit operator Arg(string)

Convenience cast for turning strings into plain Args.

public static implicit operator Arg(string value)

Parameters

value string

Returns

Arg

operator !=(Arg?, Arg?)

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

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

Parameters

left Arg

The left object

right Arg

The right object

Returns

bool

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