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

Event arguments for hotkey action events. More...

Inheritance diagram for VolumeControl.Core.Input.HotkeyPressedEventArgs:
Collaboration diagram for VolumeControl.Core.Input.HotkeyPressedEventArgs:

Public Member Functions

 HotkeyPressedEventArgs ()
 Creates a new HotkeyPressedEventArgs instance without any action settings. More...
 
 HotkeyPressedEventArgs (bool defaultHandledValue)
 Creates a new HotkeyPressedEventArgs instance without any action settings. More...
 
 HotkeyPressedEventArgs (IActionSettingInstance[] actionSettings)
 Creates a new HotkeyPressedEventArgs instance with the specified actionSettings . More...
 
 HotkeyPressedEventArgs (IActionSettingInstance[] actionSettings, bool defaultHandledValue)
 Creates a new HotkeyPressedEventArgs instance with the specified actionSettings . More...
 
IActionSettingInstance GetSetting (string name, StringComparison stringComparison=StringComparison.Ordinal)
 Gets the action setting with the specified name . More...
 
IActionSettingInstance GetSetting (string name, Type valueType, StringComparison stringComparison=StringComparison.Ordinal)
 Gets the action setting with the specified name and valueType . More...
 
IActionSettingInstance< T > GetSetting< T > (string name, StringComparison stringComparison=StringComparison.Ordinal)
 Gets the action setting with the specified name and value type. More...
 
bool TryGetSetting (string name, StringComparison stringComparison, out IActionSettingInstance setting)
 Attempts to get the action setting with the specified name . More...
 
bool TryGetSetting (string name, out IActionSettingInstance setting)
 
bool TryGetSetting (string name, Type valueType, StringComparison stringComparison, out IActionSettingInstance setting)
 Attempts to get the action setting with the specified name and valueType . More...
 
bool TryGetSetting (string name, Type valueType, out IActionSettingInstance setting)
 
bool TryGetSetting< T > (string name, StringComparison stringComparison, out IActionSettingInstance< T > setting)
 Gets the action setting with the specified name and value type. More...
 
bool TryGetSetting< T > (string name, out IActionSettingInstance< T > setting)
 
object GetValue (string name, StringComparison stringComparison=StringComparison.Ordinal)
 Gets the value of the action setting with the specified name if it is enabled; otherwise gets the setting's default value. More...
 
object GetValue (string name, Type valueType, StringComparison stringComparison=StringComparison.Ordinal)
 Gets the value of the action setting with the specified name and valueType if it is enabled; otherwise gets the setting's default value. More...
 
GetValue< T > (string name, StringComparison stringComparison=StringComparison.Ordinal)
 Gets the value of the action setting with the specified name and value type if it is enabled; otherwise gets the setting's default value. More...
 
bool TryGetValue (string name, StringComparison stringComparison, out object value)
 Attempts to get the value of the action setting with the specified name if it is enabled; otherwise gets the setting's default value. More...
 
bool TryGetValue (string name, out object value)
 
bool TryGetValue (string name, Type valueType, StringComparison stringComparison, out object value)
 Attempts to get the value of the action setting with the specified name and valueType if it is enabled; otherwise gets the setting's default value. More...
 
bool TryGetValue (string name, Type valueType, out object value)
 
bool TryGetValue< T > (string name, StringComparison stringComparison, out T value)
 Attempts to get the value of the action setting with the specified name and value type if it is enabled; otherwise gets the setting's default value. More...
 
object GetValueOrDefault (string name, StringComparison stringComparison, object defaultValue=default!)
 Gets the value of the action setting with the specified name if it isn't null or disabled. More...
 
object GetValueOrDefault (string name, object defaultValue=default!)
 
object GetValueOrDefault (string name, Type valueType, StringComparison stringComparison, object defaultValue=default!)
 Gets the value of the action setting with the specified name and valueType if it isn't null or disabled. More...
 
object GetValueOrDefault (string name, Type valueType, object defaultValue=default!)
 
GetValueOrDefault< T > (string name, StringComparison stringComparison, T defaultValue=default!)
 Gets the value of the action setting with the specified name and value type if it isn't null or disabled. More...
 
GetValueOrDefault< T > (string name, T defaultValue=default!)
 

Properties

IActionSettingInstance[] Settings [get]
 Gets the array of ActionSettings configured for the hotkey that triggered the event. More...
 

Detailed Description

Event arguments for hotkey action events.

Constructor & Destructor Documentation

◆ HotkeyPressedEventArgs() [1/4]

VolumeControl.Core.Input.HotkeyPressedEventArgs.HotkeyPressedEventArgs ( )

Creates a new HotkeyPressedEventArgs instance without any action settings.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings.

◆ HotkeyPressedEventArgs() [2/4]

VolumeControl.Core.Input.HotkeyPressedEventArgs.HotkeyPressedEventArgs ( bool  defaultHandledValue)

Creates a new HotkeyPressedEventArgs instance without any action settings.

Parameters
defaultHandledValueThe default value for the HandledEventArgs.Handled property.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings.

◆ HotkeyPressedEventArgs() [3/4]

VolumeControl.Core.Input.HotkeyPressedEventArgs.HotkeyPressedEventArgs ( IActionSettingInstance[]  actionSettings)

Creates a new HotkeyPressedEventArgs instance with the specified actionSettings .

Parameters
actionSettingsThe array of settings to send to the action method.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings.

◆ HotkeyPressedEventArgs() [4/4]

VolumeControl.Core.Input.HotkeyPressedEventArgs.HotkeyPressedEventArgs ( IActionSettingInstance[]  actionSettings,
bool  defaultHandledValue 
)

Creates a new HotkeyPressedEventArgs instance with the specified actionSettings .

Parameters
actionSettingsThe array of settings to send to the action method.
defaultHandledValueThe default value for the HandledEventArgs.Handled property.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings.

Member Function Documentation

◆ GetSetting() [1/2]

IActionSettingInstance VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting ( string  name,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Gets the action setting with the specified name .

Parameters
nameThe name of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
Returns
IActionSettingInstance with the specified name .
Exceptions
ActionSettingNotFoundExceptionThere is no action setting with the specified name .

References VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings.

Referenced by VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue(), and VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting().

Here is the caller graph for this function:

◆ GetSetting() [2/2]

IActionSettingInstance VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting ( string  name,
Type  valueType,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Gets the action setting with the specified name and valueType .

Parameters
nameThe name of the setting to get.
valueTypeThe value type of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
Returns
IActionSettingInstance with the specified name & valueType .
Exceptions
ActionSettingNotFoundExceptionThere is no action setting with the specified name & valueType .

References VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings.

◆ GetSetting< T >()

IActionSettingInstance<T> VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting< T > ( string  name,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Gets the action setting with the specified name and value type.

Template Parameters
TThe value type of the setting to get.
Parameters
nameThe name of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
Returns
IActionSettingInstance with the specified name and value type.
Exceptions
ActionSettingNotFoundExceptionThere is no action setting with the specified name and value type.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings.

Referenced by VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue< T >(), and VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting< T >().

Here is the caller graph for this function:

◆ GetValue() [1/2]

object VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue ( string  name,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Gets the value of the action setting with the specified name if it is enabled; otherwise gets the setting's default value.

Parameters
nameThe name of the action setting to get the value of.
stringComparisonThe type of StringComparison to use when comparing strings.
Returns
Value of the setting with the specified name when enabled; otherwise the default value.
Exceptions
ActionSettingNotFoundExceptionThere is no action setting with the specified name .

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting().

Referenced by VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetValue() [2/2]

object VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue ( string  name,
Type  valueType,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Gets the value of the action setting with the specified name and valueType if it is enabled; otherwise gets the setting's default value.

Parameters
nameThe name of the setting to get.
valueTypeThe value type of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
Returns
Value of the setting with the specified name & valueType when enabled; otherwise the default value.
Exceptions
ActionSettingNotFoundExceptionThere is no action setting with the specified name & valueType .

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting().

Here is the call graph for this function:

◆ GetValue< T >()

T VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue< T > ( string  name,
StringComparison  stringComparison = StringComparison.Ordinal 
)

Gets the value of the action setting with the specified name and value type if it is enabled; otherwise gets the setting's default value.

Template Parameters
TThe value type of the action setting to get.
Parameters
nameThe name of the action setting to get the value of.
stringComparisonThe type of StringComparison to use when comparing strings.
Returns
Value of the setting with the specified name and value type when enabled; otherwise the default value.
Exceptions
ActionSettingNotFoundExceptionThere is no action setting with the specified name and value type.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting< T >().

Referenced by VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetValue< T >().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetValueOrDefault() [1/2]

object VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValueOrDefault ( string  name,
StringComparison  stringComparison,
object  defaultValue = default! 
)

Gets the value of the action setting with the specified name if it isn't null or disabled.

Parameters
nameThe name of the action setting to get the value of.
stringComparisonThe type of StringComparison to use when comparing strings.
defaultValueThe value to return if the setting wasn't found, or if its value is null.
Returns
The value of the setting with the specified name if it exists and isn't null; otherwise defaultValue .

References VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting().

Here is the call graph for this function:

◆ GetValueOrDefault() [2/2]

object VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValueOrDefault ( string  name,
Type  valueType,
StringComparison  stringComparison,
object  defaultValue = default! 
)

Gets the value of the action setting with the specified name and valueType if it isn't null or disabled.

Parameters
nameThe name of the action setting to get the value of.
valueTypeThe value type of the setting to get.
stringComparisonThe type of StringComparison to use when comparing strings.
defaultValueThe value to return if the setting wasn't found, or if its value is null.
Returns
The value of the setting with the specified name and valueType if it exists and isn't null; otherwise defaultValue .

References VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting().

Here is the call graph for this function:

◆ GetValueOrDefault< T >()

T VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValueOrDefault< T > ( string  name,
StringComparison  stringComparison,
defaultValue = default! 
)

Gets the value of the action setting with the specified name and value type if it isn't null or disabled.

Template Parameters
TThe value type of the action setting to get.
Parameters
nameThe name of the action setting to get the value of.
stringComparisonThe type of StringComparison to use when comparing strings.
defaultValueThe value to return if the setting wasn't found, or if its value is null.
Returns
The value of the setting with the specified name and value type if it exists and isn't null; otherwise defaultValue .

References VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting< T >().

Here is the call graph for this function:

◆ TryGetSetting() [1/2]

bool VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting ( string  name,
StringComparison  stringComparison,
out IActionSettingInstance  setting 
)

Attempts to get the action setting with the specified name .

Parameters
nameThe name of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
settingIActionSettingInstance with the specified name .
Returns
true when the setting was found and isn't null; otherwise false.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting().

Referenced by VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValueOrDefault().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryGetSetting() [2/2]

bool VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting ( string  name,
Type  valueType,
StringComparison  stringComparison,
out IActionSettingInstance  setting 
)

Attempts to get the action setting with the specified name and valueType .

Parameters
nameThe name of the setting to get.
valueTypeThe value type of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
settingIActionSettingInstance with the specified name & valueType .
Returns
true when the setting was found and isn't null; otherwise false.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting().

Here is the call graph for this function:

◆ TryGetSetting< T >()

bool VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetSetting< T > ( string  name,
StringComparison  stringComparison,
out IActionSettingInstance< T >  setting 
)

Gets the action setting with the specified name and value type.

Template Parameters
TThe value type of the setting to get.
Parameters
nameThe name of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
settingIActionSettingInstance with the specified name and value type.
Returns
true when the setting was found and isn't null; otherwise false.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetSetting< T >().

Referenced by VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValueOrDefault< T >().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TryGetValue() [1/2]

bool VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetValue ( string  name,
StringComparison  stringComparison,
out object  value 
)

Attempts to get the value of the action setting with the specified name if it is enabled; otherwise gets the setting's default value.

Parameters
nameThe name of the action setting to get the value of.
stringComparisonThe type of StringComparison to use when comparing strings.
valueValue of the setting with the specified name .
Returns
true when the setting was found and the value isn't null; otherwise false.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue().

Here is the call graph for this function:

◆ TryGetValue() [2/2]

bool VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetValue ( string  name,
Type  valueType,
StringComparison  stringComparison,
out object  value 
)

Attempts to get the value of the action setting with the specified name and valueType if it is enabled; otherwise gets the setting's default value.

Parameters
nameThe name of the setting to get.
valueTypeThe value type of the setting to get.
stringComparisonThe comparison type to use when performing string comparisons.
valueValue of the setting with the specified name & valueType .
Returns
true when the setting was found and the value isn't null; otherwise false.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue().

Here is the call graph for this function:

◆ TryGetValue< T >()

bool VolumeControl.Core.Input.HotkeyPressedEventArgs.TryGetValue< T > ( string  name,
StringComparison  stringComparison,
out T  value 
)

Attempts to get the value of the action setting with the specified name and value type if it is enabled; otherwise gets the setting's default value.

Template Parameters
TThe value type of the action setting to get.
Parameters
nameThe name of the action setting to get the value of.
stringComparisonThe type of StringComparison to use when comparing strings.
valueValue of the setting with the specified name and value type.
Returns
true when the setting was found and the value isn't null; otherwise false.

References VolumeControl.Core.Input.HotkeyPressedEventArgs.GetValue< T >().

Here is the call graph for this function:

Property Documentation

◆ Settings

IActionSettingInstance [] VolumeControl.Core.Input.HotkeyPressedEventArgs.Settings
get

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