Class CommandAccessPoint
- Namespace
- ZeroInstall.DesktopIntegration.AccessPoints
- Assembly
- ZeroInstall.DesktopIntegration.dll
Adds a way to explicitly launch the application to the desktop environment.
public abstract class CommandAccessPoint : AccessPoint, ICloneable<AccessPoint>, IEquatable<CommandAccessPoint>
- Inheritance
-
objectCommandAccessPoint
- Implements
- Derived
- Inherited Members
Constructors
CommandAccessPoint()
protected CommandAccessPoint()
Properties
Command
The name of the Command to use when launching via this access point. Leave empty to use default.
public string? Command { get; set; }
Property Value
Name
The name of the menu entry, icon, command-line, etc..
public string? Name { get; set; }
Property Value
Methods
CloneFromTo(CommandAccessPoint, CommandAccessPoint)
Copies all members declared by CommandAccessPoint from one instance to another.
protected static void CloneFromTo(CommandAccessPoint from, CommandAccessPoint to)
Parameters
fromCommandAccessPointtoCommandAccessPoint
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(CommandAccessPoint?)
protected bool Equals(CommandAccessPoint? other)
Parameters
otherCommandAccessPoint
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
Returns the access point in the form "AccessPointType: Name (Command)". Not safe for parsing!
public override string ToString()
Returns
ValidateNameForRemoval()
Ensures that Name can safely be used to locate an existing access point. Call from Unapply(AppEntry, bool).
[MemberNotNull("Name")]
protected void ValidateNameForRemoval()
Remarks
More lenient than Validate(string?), so that access points created under older or other rules can still be removed.
Exceptions
- IOException
Name is empty or contains characters not allowed in file names on this platform.
Operators
operator ==(CommandAccessPoint?, CommandAccessPoint?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(CommandAccessPoint? left, CommandAccessPoint? right)
Parameters
leftCommandAccessPointThe left object
rightCommandAccessPointThe right object
Returns
- bool
true if the objects are equal; otherwise, false.
operator !=(CommandAccessPoint?, CommandAccessPoint?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(CommandAccessPoint? left, CommandAccessPoint? right)
Parameters
leftCommandAccessPointThe left object
rightCommandAccessPointThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.