When 12d Synergy needs to run an event that might take some time on the server, it does so with an event.

This works in several stages:

  1. The event is sent
  2. A response is received from the server about the success of the queuing of the event
  3. The client waits for the server to process the event
  4. A response is received

The 12d Synergy Client API takes care of this process for you but allows you to determine what should happen while the user waits.

An automated process may not need to display anything to the user, but something with a UI may wish to display a "please wait" or other UI element.

The client API comes with two standard Waits:

SimpleWait - This is the default if nothing is specified. It simply blocks with no updates.

UIWait -  This can be used if you want to show a "please wait" message while the operation is processed on the server.

Alternatively, you may wish to provide your own Wait class by implementing SynergyClient.IASyncWait- this allows you to provide your own feedback to the user, which should be displayed when the Wait method is called.

OperationCallbacks

You will note that the two standard Waits provide a secondary constructor using OperationCallback.

By passing an OperationCallback (which is a callback to a method that accepts a parameter of ResponseWrapper), you can intercept server messages back to the client for your own purposes.