This is the main operational file of the extension and follows the design as described at https://software.inventu.com/help/html/FVExtLogger/index.html
There are some complex functions managed, including caching and loading key values should the FVTerm v4.0 Application Pool be recycled for any reason...so that important field variable values will persist for an entire user emulation session.
Important methods include:
static ExtLogger()
Will initialize the various dictionaries used to manage scripting, then compile the InventuSSO.cfg file to create the executable structures managed as each major event method is executed (PreConnectEx, PostConnectEx, LogEnter and LogScreen).
This starts each user connection and is called by the FVTerm runtime before the connection is made. If the active host has not in any HostName or HostNames sections, the connection will be ignored and no further scripting will run.
If it is a defined host, all relevant values from the initial connection HTTP request will be loaded, including the Formal Field Names and other connection specifics. The VarMap global settings will be used to map any HTTP values for use in the scripting.
static public bool PostConnectEx(HostScreen oScreen, Dictionary<string, object> connectInfo,
ref string errorMessage)
This is called after the host emulation session has started, and the first screen is displayed. The active State will be set to Logon1 when the either the GenericUser mode is active or CredentialsManaged is true and the user has signed-on before, or if neither GenericUser or CredentialsManaged is active. If CredentialsManaged is set but the user has not signed on before (Credentials not found), the State will be set to Capture.
Once the State has been set, the ScreenActions.Exec method is called to run the active scripting. All subsequent scripting will depend on the state set based on the active State, Screen recognition and the WhenState block executed.
static public void RunDelayedScript(DebugLogs logger, HostScreen oScreen, bool inBound, string when)
This is called by both the LogEnter and LogScreen methods and will load the active session's connectInfo Dictionary values and if the Exit state has not yet been set, call ScreenActions.Exec with state properly set based on the inBound bool.
static public bool LogEnter(DebugLogs logger, string aidKeys, Field[] fields, HostScreen oScreen)
This is called after a user has entered a screen--it simply calls RunDelayedScript with the inBound parameter=true. At this time, a true is returned to prevent logging of the screen by the FVTerm core logic but future versions will make this based on a Field value setting.
static public bool LogScreen(DebugLogs logger, HostScreen oScreen)
This is called when a screen is displayed/updated by the host--it simply calls RunDelayedScript with the inBound parameter=false. At this time, a null is returned to prevent logging of the screen by the FVTerm core logic but future versions will make this based on a Field value setting.