Class Capability
A capability is a logical grouping of actions and attributes which belong together.
public class Capability : Descriptor, IEquatable<Descriptor>, IComparable<Descriptor>, IEquatable<Capability>
- Inheritance
-
Capability
- Implements
- Derived
- Inherited Members
Constructors
Capability(string, string, Image, bool, IList<ActionDescriptor>, IList<AttributeDescriptor>, string, string)
Creates a new capability.
public Capability(string displayName, string description, Image icon, bool isUsefulContainer, IList<ActionDescriptor> actions, IList<AttributeDescriptor> attributes, string labelAttributeName, string contentAttributeName)
Parameters
displayNamestringThe name of the capability. This should be CamelCased.
descriptionstringA short description of the capability.
iconImageAn icon which represents the capability, or
nullto use the default icon.isUsefulContainerboolIf true, the capability represents, from a user interface perspective, a useful/logical container. and is used alternatively to the name in RxPath.
actionsIList<ActionDescriptor>A list of actions provided by this capability.
attributesIList<AttributeDescriptor>A list of attributes provided by this capability.
labelAttributeNamestringName of the attribute which acts as a label (can be null).
contentAttributeNamestringName of the attribute which represents the content of an element (can be null).
Capability(string, string, string, Image, bool, IList<ActionDescriptor>, IList<AttributeDescriptor>)
Creates a new capability.
public Capability(string displayName, string shortName, string description, Image icon, bool isUsefulContainer, IList<ActionDescriptor> actions, IList<AttributeDescriptor> attributes)
Parameters
displayNamestringThe name of the capability. This should be CamelCased.
shortNamestringThe shorthand name of the capability. This is not required to be unique.
descriptionstringA short description of the capability.
iconImageAn icon which represents the capability, or
nullto use the default icon.isUsefulContainerboolIf true, the capability represents, from a user interface perspective, a useful/logical container. and is used alternatively to the name in RxPath.
actionsIList<ActionDescriptor>A list of actions provided by this capability.
attributesIList<AttributeDescriptor>A list of attributes provided by this capability.
Capability(string, string, string, Image, bool, IList<ActionDescriptor>, IList<AttributeDescriptor>, string, string)
Creates a new capability.
public Capability(string displayName, string shortName, string description, Image icon, bool isUsefulContainer, IList<ActionDescriptor> actions, IList<AttributeDescriptor> attributes, string labelAttributeName, string contentAttributeName)
Parameters
displayNamestringThe name of the capability. This should be CamelCased.
shortNamestringThe shorthand name of the capability. This is not required to be unique.
descriptionstringA short description of the capability.
iconImageAn icon which represents the capability, or
nullto use the default icon.isUsefulContainerboolIf true, the capability represents, from a user interface perspective, a useful/logical container. and is used alternatively to the name in RxPath.
actionsIList<ActionDescriptor>A list of actions provided by this capability.
attributesIList<AttributeDescriptor>A list of attributes provided by this capability.
labelAttributeNamestringName of the attribute which acts as a label (can be null).
contentAttributeNamestringName of the attribute which represents the content of an element (can be null).
Fields
Checkable
Represents a check box that allows the user to select a true or false condition.
public static readonly Capability Checkable
Field Value
DynamicCapabilityDisplayName
Defines the name for the "Dynamic" capability, providing dynamic attributes and actions of an element.
public static readonly string DynamicCapabilityDisplayName
Field Value
Properties
Actions
A list of actions, provided as a by-name dictionary.
[TypeConverter(typeof(CollectionConverter))]
public IDictionary<string, ActionDescriptor> Actions { get; }
Property Value
Attributes
A list of attributes, provided as a by-name dictionary.
[TypeConverter(typeof(CollectionConverter))]
public IDictionary<string, AttributeDescriptor> Attributes { get; }
Property Value
ContentAttributeName
The name of the attribute for this capability which represents the content of an element.
or null if the capability has no content attribute.
public string ContentAttributeName { get; }
Property Value
Icon
An icon representing the capability. Should be 16x16 pixels.
public Image Icon { get; }
Property Value
IsUsefulContainer
If true, the capability represents, from a user interface perspective, a useful/logical container.
public bool IsUsefulContainer { get; }
Property Value
LabelAttributeName
The name of the attribute for this capability which acts as a label for an element.
or null if the capability has no label attribute.
public string LabelAttributeName { get; }
Property Value
ShortDisplayName
The shorthand display name of this capability.
public string ShortDisplayName { get; }
Property Value
ShortName
The shorthand name of this capability.
public string ShortName { get; }
Property Value
Methods
Equals(Capability)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(Capability other)
Parameters
otherCapabilityAn object to compare with this object.
Returns
- bool
trueif the current object is equal to theotherparameter; otherwise,false.
Equals(object)
Determines whether the specified object is equal to this instance.
public override bool Equals(object obj)
Parameters
Returns
GetHashCode()
Returns a hash code for this instance.
public override int GetHashCode()
Returns
- int
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
GetPredefinedCapabilities()
Returns a list of predefined capabilites.
public static IList<Capability> GetPredefinedCapabilities()
Returns
- IList<Capability>
A list of predefined capabilites.
ToString()
To string.
public override string ToString()
Returns
- string
String.
Operators
operator ==(Capability, Capability)
Implements the operator ==.
public static bool operator ==(Capability c1, Capability c2)
Parameters
c1CapabilityCapability 1.
c2CapabilityCapability 2.
Returns
- bool
Trueif the two Capability instances have the same Name, otherwisefalse.
operator !=(Capability, Capability)
Implements the operator !=.
public static bool operator !=(Capability c1, Capability c2)
Parameters
c1CapabilityCapability 1.
c2CapabilityCapability 2.
Returns
- bool
Trueif the two Capability instances do not have the same Name, otherwisefalse.