IConnection.ChangeSystemRequest Event

The ChangeSystemRequest event is triggered when the runtime system performs a switch to another system.

Namespace – ABSuite.AccessLayer.Connector.Core

Assembly – Unisys.ABSuite.AccessLayer.Connector.Core (in Unisys.ABSuite.AccessLayer.Connector.Core.dll)

Syntax

event EventHandler<ConnectionChangeSystemRequestCancelEventArgs> 
ChangeSystemRequest

Using the IConnection Interface for the ChangeSystemRequest Event

The following code is an example of using the ChangeSystemRequest event:

// HandleChangeSystemRequest is the handler for processing the 
// ChangeSystemRequest event when the Host application does a switch 
// to another application.  
    public void HandleChangeSystemRequest(object sender, ConnectionChangeSystemRequestCancelEventArgs args)
    {
      // A switch to another application has occurred. Retrieve the 
      // new system name and log it. 
      // The client application must have a reference to the 
      // DataModels assembly for the system being switched. 
      // Otherwise it will not be able to process the 
      // transactions for the new application context. 
            
        string newSystem = args.Name;
        ApplicationLogger.LogInfo(() => string.Format("Host Application has switched to system: {0}", 
        newSystem));
}