Table of Contents

Class ContextMenu

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

An entry in the file manager's context menu for all file types.

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

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.

Extensions

A list of file extensions this context menu entry is displayed for. Only applicable when Target is Files. The context menu is shown for all file types when this empty.

[Browsable(false)]
[OrderedEquality]
public List<FileTypeExtension> Extensions { get; }

Property Value

List<FileTypeExtension>

Target

Controls which file system object types this context menu entry is displayed for.

public ContextMenuTarget Target { get; set; }

Property Value

ContextMenuTarget

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.

ToString()

Returns the capability in the form "ID". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(ContextMenu?, ContextMenu?)

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

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

Parameters

left ContextMenu

The left object

right ContextMenu

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(ContextMenu?, ContextMenu?)

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

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

Parameters

left ContextMenu

The left object

right ContextMenu

The right object

Returns

bool

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