Skip to main content
Definition: LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/AnalyzerUtils.cs (line 57) Useful library of methods which do logic for analyzer components.

Members

Private static functions

Function TryConvertName

Try to convert a variable name between analyzer and ModelCenter or vice-versa. Parameters:
  • input: The input name.
  • varInfo: The analyzer variable info (mandatory).
  • conversion: The conversion to perform.
  • output: The output name.
Returns: True on success, false on failure. Parameters: Return type: bool

Function TryGetActualName

Try to convert a display name to an actual name or vice versa. Parameters:
  • input: The input name.
  • varInfo: The analyzer variable info, which may be null.
  • conversion: The conversion to perform.
  • allowConstant: Whether to allow constants.
  • output: The output name.
Returns: True on success, false on failure. Parameters: Return type: bool

Function TryConvertExpression

Try to convert an entire expression from analyzer/display names to ModelCenter names or vice-versa. No effort is made to actually parse the expression. Parameters:
  • input: The input expression.
  • varInfo: The variable info, or null if none. If null or no analyzer variables, copies input to output and returns true.
  • conversion: The type of conversion.
  • output: The converted expression.
Returns: True on success, false on failure. Parameters: Return type: bool

Public static functions

Function IsValidFormula

Convenience method to determine if the given expression is a valid formula. Parameters:
  • formula: The formula to check.
  • varInfo: The analyzer variable info, or null if none.
  • conversion: The type of conversion to try to perform.
  • expressionType: The type of expression to expect.
  • allowEmpty: Whether to allow an empty or null string.
Returns: True if yes, false if no. Parameters: Return type: bool

Function TryConvertFormula

Convert from a display formula to an actual formula or vice-versa. Parameters:
  • inputFormula: The formula to convert.
  • varInfo: The analyzer variable info, or null if none.
  • conversion: The type of conversion to perform.
  • expressionType: The type of expression to expect.
  • allowEmpty: Whether to allow an empty or null string.
  • outputFormula: The converted formula.
Returns: True on success, false on failure. Parameters: Return type: bool