PreInit should be performed by business systems that do not want to be connected at all time, but only upon request by NoahClient or itself when needed.
The Business system needs to call PreInit with a delegate to a method that can call connect on the BusinessAPI.
bool PreInit(RequestBSConnectNC r);
If the UserManager or PatientManager do not connect to NoahClient when the application starts, NoahClient must have a way to request the application to connect if it is running (to avoid that another instance of the same application is started). In order to make this possible the application must call PreInit. The PreInit call creates a named event based on where the application is installed and the name of the application. This information is also available in NoahClient, as it is one of the registration parameters. Whenever NoahClient needs the application to connect, the event is signaled.
Returns false if the function already has been called, and true otherwise.
When an application shuts down it should call the PreUnint, which releases all resources allocated by the call of PreInit.
The function returns false if called without a call to PreInit and true otherwise.
delegate bool RequestBSConnectNC();
The delegate that the User/Patient manager must implement. RequestBSConnectNC() is called by NoahClient when it needs to launch a UserManager or PatientManager, to request the manager to Connect to Noah.