Table of Contents

Class Candidate

Namespace
ZeroInstall.Publish.EntryPoints
Assembly
ZeroInstall.Publish.dll

Collects information about a potential candidate for an entry point. The subclass type determines the type of executable (native binary, interpreted script, etc.).

[Equatable]
public abstract class Candidate : IEquatable<Candidate>
Inheritance
Candidate
Implements
Derived
Inherited Members

Properties

Architecture

The application's target architecture.

public Architecture Architecture { get; set; }

Property Value

Architecture

BaseDirectory

The base directory containing the entire application.

[Browsable(false)]
[IgnoreEquality]
protected DirectoryInfo? BaseDirectory { get; }

Property Value

DirectoryInfo

Category

The main category of the application. May influence the placement in the start menu.

[TypeConverter(typeof(CategoryNameConverter))]
public string? Category { get; set; }

Property Value

string

CommandName

The Name used by CreateCommand().

protected string CommandName { get; }

Property Value

string

Name

The application's name.

public string? Name { get; set; }

Property Value

string

Remarks

A suggestion for Name.

NeedsTerminal

Indicates whether the application is a command-line application (true) or a GUI application (false).

public bool NeedsTerminal { get; set; }

Property Value

bool

RelativePath

The path of this entry point relative to BaseDirectory.

[Browsable(false)]
public string? RelativePath { get; }

Property Value

string

Summary

Short one-line description; the first word should not be upper-case unless it is a proper noun (e.g. "cures all ills").

public string? Summary { get; set; }

Property Value

string

Remarks

A suggestion for Summaries.

Version

The application's current version.

public ImplementationVersion? Version { get; set; }

Property Value

ImplementationVersion

Methods

CreateCommand()

Creates a Command to launch this entry point.

public abstract Command CreateCommand()

Returns

Command

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

protected bool Equals(Candidate? other)

Parameters

other Candidate

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsExecutable(string)

Determines whether a file is executable.

protected bool IsExecutable(string path)

Parameters

path string

Returns

bool

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToVersionRange(ImplementationVersion?)

protected static VersionRange? ToVersionRange(ImplementationVersion? version)

Parameters

version ImplementationVersion

Returns

VersionRange

Operators

operator ==(Candidate?, Candidate?)

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

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

Parameters

left Candidate

The left object

right Candidate

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(Candidate?, Candidate?)

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

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

Parameters

left Candidate

The left object

right Candidate

The right object

Returns

bool

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