Table of Contents

Class DefaultProgram

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

Can act as the default provider for a well-known service such web-browser, e-mail client.

[Serializable]
[Equatable]
public sealed class DefaultProgram : VerbCapability, IEquatable<XmlUnknown>, ICloneable<Capability>, IEquatable<Capability>, IEquatable<DefaultCapability>, IIconContainer, IDescriptionContainer, IEquatable<IconCapability>, IEquatable<VerbCapability>, IEquatable<DefaultProgram>
Inheritance
DefaultProgram
Implements
Inherited Members

Fields

ServiceCalender

Canonical Service for calender tools.

public const string ServiceCalender = "Calender"

Field Value

string

ServiceContacts

Canonical Service for address books.

public const string ServiceContacts = "Contacts"

Field Value

string

ServiceInternet

Canonical Service for web browsers.

public const string ServiceInternet = "StartMenuInternet"

Field Value

string

ServiceInternetCall

Canonical Service for internet call tools.

public const string ServiceInternetCall = "Internet Call"

Field Value

string

ServiceJava

Canonical Service for Java Virtual Machines.

public const string ServiceJava = "JVM"

Field Value

string

ServiceMail

Canonical Service for mail clients.

public const string ServiceMail = "Mail"

Field Value

string

ServiceMedia

Canonical Service for media players.

public const string ServiceMedia = "Media"

Field Value

string

ServiceMessenger

Canonical Service for instant messengers.

public const string ServiceMessenger = "IM"

Field Value

string

Properties

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.

InstallCommands

Lists the commands the application registers for use by Windows' "Set Program Access and Defaults". Will be transparently replaced with Zero Install commands at runtime.

public InstallCommands InstallCommands { get; set; }

Property Value

InstallCommands

Remarks

These strings are used for registry filtering. They are never actually executed.

Service

The name of the service the application provides. Well-known values on Windows are: Mail, Media, IM, JVM, Calender, Contacts, Internet Call

public required string Service { get; set; }

Property Value

string

WindowsMachineWideOnly

Indicates whether this capability can be registered only machine-wide and not per-user on Windows systems.

public override bool WindowsMachineWideOnly { get; }

Property Value

bool

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.

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 capability in the form "Service (ID)". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(DefaultProgram?, DefaultProgram?)

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

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

Parameters

left DefaultProgram

The left object

right DefaultProgram

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(DefaultProgram?, DefaultProgram?)

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

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

Parameters

left DefaultProgram

The left object

right DefaultProgram

The right object

Returns

bool

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