Volume Control
Application-specific hotkeys for Windows
VolumeControl.Core.Input.Actions.HotkeyActionDefinition Class Reference

Represents the definition of a hotkey action, including metadata and the reflection classes for targeting the method. More...

Collaboration diagram for VolumeControl.Core.Input.Actions.HotkeyActionDefinition:

Public Member Functions

 HotkeyActionDefinition (object objectInstance, MethodInfo methodInfo, string name, string? description, string? groupName, Brush? groupBrush, ActionSettingDefinition[] actionSettingDefinitions)
 Creates a new HotkeyActionDefinition instance for a non-static action method. More...
 
 HotkeyActionDefinition (Type objectType, MethodInfo methodInfo, string name, string? description, string? groupName, Brush? groupBrush, ActionSettingDefinition[] actionSettingDefinitions)
 Creates a new HotkeyActionDefinition instance for a static action method. More...
 
HotkeyActionInstance CreateInstance ()
 Creates a new HotkeyActionInstance instance from this definition. More...
 
HotkeyActionInstance CreateInstance (IActionSettingInstance[] actionSettings)
 Creates a new HotkeyActionInstance instance from this definition and the specified actionSettings . More...
 
ActionSettingDefinitionGetActionSettingDefinition (string name, StringComparison stringComparison=StringComparison.Ordinal)
 Gets the ActionSettingDefinition object with the specified name . More...
 

Properties

Type ActionGroupType [get]
 Gets the class type of the hotkey action group that this action belongs to. More...
 
object? ActionGroupInstance [get]
 Gets the class instance of the hotkey action group that this action belongs to. More...
 
MethodInfo ActionMethodInfo [get]
 Gets the method info for the action method that this action represents. More...
 
string Name [get]
 Gets the name of this action. More...
 
string? Description [get]
 Gets the description of this action. More...
 
string? GroupName [get]
 Gets the group name of this action. More...
 
Brush? GroupBrush [get]
 Gets the brush for the group name of this action. More...
 
ActionSettingDefinition[] ActionSettingDefinitions [get]
 Gets the action setting definitions of this action. More...
 
string Identifier [get]
 Gets the identifier string of this action. More...
 

Detailed Description

Represents the definition of a hotkey action, including metadata and the reflection classes for targeting the method.

Constructor & Destructor Documentation

◆ HotkeyActionDefinition() [1/2]

VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition ( object  objectInstance,
MethodInfo  methodInfo,
string  name,
string?  description,
string?  groupName,
Brush?  groupBrush,
ActionSettingDefinition[]  actionSettingDefinitions 
)

◆ HotkeyActionDefinition() [2/2]

VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition ( Type  objectType,
MethodInfo  methodInfo,
string  name,
string?  description,
string?  groupName,
Brush?  groupBrush,
ActionSettingDefinition[]  actionSettingDefinitions 
)

Member Function Documentation

◆ CreateInstance() [1/2]

HotkeyActionInstance VolumeControl.Core.Input.Actions.HotkeyActionDefinition.CreateInstance ( )

Creates a new HotkeyActionInstance instance from this definition.

Returns
A new HotkeyActionInstance object.

◆ CreateInstance() [2/2]

HotkeyActionInstance VolumeControl.Core.Input.Actions.HotkeyActionDefinition.CreateInstance ( IActionSettingInstance[]  actionSettings)

Creates a new HotkeyActionInstance instance from this definition and the specified actionSettings .

Parameters
actionSettingsThe action settings to use for the action instance.
Returns
A new HotkeyActionInstance object with the specified actionSettings .

◆ GetActionSettingDefinition()

ActionSettingDefinition? VolumeControl.Core.Input.Actions.HotkeyActionDefinition.GetActionSettingDefinition ( string  name,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Gets the ActionSettingDefinition object with the specified name .

Parameters
nameThe name of the action setting definition to get.
stringComparisonThe comparison type to use for string comparisons.
Returns
The ActionSettingDefinition with the specified name if found; otherwise null.

References VolumeControl.Core.Input.Actions.HotkeyActionDefinition.ActionSettingDefinitions.

Property Documentation

◆ ActionGroupInstance

object? VolumeControl.Core.Input.Actions.HotkeyActionDefinition.ActionGroupInstance
get

Gets the class instance of the hotkey action group that this action belongs to.

Referenced by VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition().

◆ ActionGroupType

Type VolumeControl.Core.Input.Actions.HotkeyActionDefinition.ActionGroupType
get

Gets the class type of the hotkey action group that this action belongs to.

Referenced by VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition().

◆ ActionMethodInfo

MethodInfo VolumeControl.Core.Input.Actions.HotkeyActionDefinition.ActionMethodInfo
get

Gets the method info for the action method that this action represents.

Do not use this to invoke the method!
Use HotkeyActionInstance.Invoke(IHotkey, HotkeyPressedEventArgs) instead!

Referenced by VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition().

◆ ActionSettingDefinitions

ActionSettingDefinition [] VolumeControl.Core.Input.Actions.HotkeyActionDefinition.ActionSettingDefinitions
get

◆ Description

string? VolumeControl.Core.Input.Actions.HotkeyActionDefinition.Description
get

Gets the description of this action.

Referenced by VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition().

◆ GroupBrush

Brush? VolumeControl.Core.Input.Actions.HotkeyActionDefinition.GroupBrush
get

Gets the brush for the group name of this action.

Referenced by VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition().

◆ GroupName

string? VolumeControl.Core.Input.Actions.HotkeyActionDefinition.GroupName
get

◆ Identifier

string VolumeControl.Core.Input.Actions.HotkeyActionDefinition.Identifier
get

Gets the identifier string of this action.

Referenced by VolumeControl.Core.Input.Actions.HotkeyActionDefinition.HotkeyActionDefinition().

◆ Name

string VolumeControl.Core.Input.Actions.HotkeyActionDefinition.Name
get

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