Zero Install .NET API 2.20.0
ZeroInstall.Model.Capabilities.Verb Class Reference

The mapping of an action/verb (e.g. open, edit) to a Command. More...

Inheritance diagram for ZeroInstall.Model.Capabilities.Verb:
ZeroInstall.Model.XmlUnknown ZeroInstall.Model.IDescriptionContainer NanoByte.Common.ICloneable< Verb >

Public Member Functions

void Normalize ()
 Converts legacy elements, sets default values, etc.. More...
 
override string ToString ()
 Returns the extension in the form "Name = Command". Not safe for parsing!
 
Verb Clone ()
 Creates a deep copy of this Verb instance. More...
 
bool Equals (Verb? other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
- Public Member Functions inherited from ZeroInstall.Model.XmlUnknown
string ToShortXml ()
 Returns a shortened XML representation (with attributes but without child elements). More...
 
override int GetHashCode ()
 
- Public Member Functions inherited from NanoByte.Common.ICloneable< Verb >
Verb Clone ()
 

Static Public Attributes

const string NameOpen = "open"
 Canonical Name for opening a file.
 
const string NameOpenNew = "opennew"
 Canonical Name for opening a file in a new window.
 
const string NameOpenAs = "openas"
 Canonical Name for opening a file in an application of the user's choice.
 
const string NameEdit = "edit"
 Canonical Name for opening a file in editing mode.
 
const string NamePlay = "play"
 Canonical Name for opening a media file and starting playback immediately.
 
const string NamePrint = "print"
 Canonical Name for printing a file while displaying as little as necessary to complete the task.
 
const string NamePreview = "Preview"
 Canonical Name for displaying a quick, simple response that allows the user to rapidly preview and dismiss items.
 

Properties

string Name = default! [getset]
 The name of the verb. Must be an alphanumeric string. Use canonical names to get automatic localization; specify Descriptions otherwise.
 
string? Command [getset]
 The name of the command in the Feed to use when launching via this capability; leave null for Model.Command.NameRun.
 
List< ArgArguments = new() [get]
 Command-line arguments to be passed to the command. Will be automatically escaped to allow proper concatenation of multiple arguments containing spaces. "${item}" gets replaced with the path of the file being opened.
 
string? ArgumentsLiteral [getset]
 Command-line arguments to be passed to the command in escaped form. "%V" gets replaced with the path of the file being opened. This is ignored if Arguments has elements.
 
bool Extended [getset]
 Set this to true to hide the verb in the Windows context menu unless the Shift key is pressed when opening the menu.
 
LocalizableStringCollection Descriptions = new() [get]
 
- Properties inherited from ZeroInstall.Model.IDescriptionContainer
LocalizableStringCollection Descriptions [get]
 Full descriptions for different languages, which can be several paragraphs long.
 

Additional Inherited Members

- Public Attributes inherited from ZeroInstall.Model.XmlUnknown
XmlAttribute?[] UnknownAttributes
 Contains any unknown additional XML attributes.
 
XmlElement?[] UnknownElements
 Contains any unknown additional XML elements.
 
- Protected Member Functions inherited from ZeroInstall.Model.XmlUnknown
void EnsureAttribute (object? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null). More...
 
void EnsureAttributeSafeID (string? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null) and only contains alphanumeric characters, spaces ( ), dots (.), underscores (_), hyphens (-) and plus signs (+). More...
 
bool Equals (XmlUnknown? other)
 

Detailed Description

The mapping of an action/verb (e.g. open, edit) to a Command.

Member Function Documentation

◆ Clone()

Verb ZeroInstall.Model.Capabilities.Verb.Clone ( )
inline

Creates a deep copy of this Verb instance.

Returns
The new copy of the Verb.

◆ Normalize()

void ZeroInstall.Model.Capabilities.Verb.Normalize ( )

Converts legacy elements, sets default values, etc..

Exceptions
InvalidDataExceptionA required property is not set or invalid.

The documentation for this class was generated from the following file: