VECTO Input Manager
Loading...
Searching...
No Matches
VectoInputManager.Core.PathUtils Class Reference

Provides utility methods for navigating and extracting values from JSON objects (JObject) and strongly-typed .NET objects using path expressions. More...

Static Public Member Functions

static bool? object value FindJObject (JObject jsonObject, PromptAction action, ILogger? logger)
static ? PropertyInfo? object? object parent FindValue (object rootObject, string propertyPath)

Static Public Attributes

static bool found
 Searches for a value in a JObject using a property path from a PromptAction. Handles special cases like "$values" arrays and indexed array access.
static ? PropertyInfo prop
 Navigates through a .NET object hierarchy using a dot-notation property path with optional array indexing.
static ? PropertyInfo? object value

Detailed Description

Provides utility methods for navigating and extracting values from JSON objects (JObject) and strongly-typed .NET objects using path expressions.

Member Function Documentation

◆ FindJObject()

bool? object value VectoInputManager.Core.PathUtils.FindJObject ( JObject jsonObject,
PromptAction action,
ILogger? logger )
inlinestatic

Gets the default value for complex types (Class or Collection) from the action's template or selection.

Member Data Documentation

◆ found

bool VectoInputManager.Core.PathUtils.found
static

Searches for a value in a JObject using a property path from a PromptAction. Handles special cases like "$values" arrays and indexed array access.

Parameters
jsonObjectThe JObject to search within.
actionThe PromptAction containing the property path and type information.
Returns
A tuple indicating if the value was found and the extracted value (or default).

◆ prop

? PropertyInfo VectoInputManager.Core.PathUtils.prop
static

Navigates through a .NET object hierarchy using a dot-notation property path with optional array indexing.

Parameters
rootObjectThe root object to start navigation from.
propertyPathThe property path (e.g., "ElectricMotorTorqueLimits.ElectricMachine.VoltageLevel[0].Voltage").
Returns
A tuple containing the final PropertyInfo, its value, and the parent object.

The documentation for this class was generated from the following file:
  • VectoInputManagerCore/PathUtils.cs