Table of Contents

Class RemoveHook

Namespace
ZeroInstall.Model.Capabilities
Assembly
ZeroInstall.Model.dll

A hook/callback into the application to be called during 0install remove.

[Serializable]
[Equatable]
public sealed class RemoveHook : Capability, IEquatable<XmlUnknown>, ICloneable<Capability>, IEquatable<Capability>, IEquatable<RemoveHook>
Inheritance
RemoveHook
Implements
Inherited Members

Properties

Arguments

Command-line arguments to be passed to the command. Will be automatically escaped to allow proper concatenation of multiple arguments containing spaces.

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

Property Value

List<Arg>

Command

The name of the command in the Feed to use when a removal of the app is requested; leave null for NameRun.

[TypeConverter(typeof(CommandNameConverter))]
public string? Command { get; set; }

Property Value

string

ConflictIDs

Identifiers from a namespace global to all Capabilitys. Collisions in this namespace indicate that the concerned Capabilitys are in conflict cannot be registered on a single system at the same time.

[Browsable(false)]
[IgnoreEquality]
public override IEnumerable<string> ConflictIDs { get; }

Property Value

IEnumerable<string>

Remarks

These identifiers are not guaranteed to stay the same between versions. They should not be stored in files but instead always generated on demand.

Methods

Clone()

Creates a deep copy of this Capability instance.

public override Capability Clone()

Returns

Capability

The new copy of the Capability.

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.

ToString()

Returns the capability in the form "Command". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(RemoveHook?, RemoveHook?)

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

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

Parameters

left RemoveHook

The left object

right RemoveHook

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(RemoveHook?, RemoveHook?)

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

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

Parameters

left RemoveHook

The left object

right RemoveHook

The right object

Returns

bool

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