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
ServiceContacts
Canonical Service for address books.
public const string ServiceContacts = "Contacts"
Field Value
ServiceInternet
Canonical Service for web browsers.
public const string ServiceInternet = "StartMenuInternet"
Field Value
ServiceInternetCall
Canonical Service for internet call tools.
public const string ServiceInternetCall = "Internet Call"
Field Value
ServiceJava
Canonical Service for Java Virtual Machines.
public const string ServiceJava = "JVM"
Field Value
ServiceMail
Canonical Service for mail clients.
public const string ServiceMail = "Mail"
Field Value
ServiceMedia
Canonical Service for media players.
public const string ServiceMedia = "Media"
Field Value
ServiceMessenger
Canonical Service for instant messengers.
public const string ServiceMessenger = "IM"
Field Value
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
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
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
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
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
objectThe object to compare with the current object.
Returns
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
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
DefaultProgramThe left object
right
DefaultProgramThe 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
DefaultProgramThe left object
right
DefaultProgramThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.