Asynchronously changes the station for the session.

Namespace: ININ.IceLib.Connection
Assembly: ININ.IceLib (in ININ.IceLib.dll) Version: 0.0.0.0 (22.3.0.218)

Syntax

C#
public void ChangeStationAsync(
	StationSettings stationSettings,
	AsyncCompletedEventHandler completedCallback,
	Object userState
)
Visual Basic
Public Sub ChangeStationAsync ( _
	stationSettings As StationSettings, _
	completedCallback As AsyncCompletedEventHandler, _
	userState As Object _
)

Parameters

stationSettings
Type: ININ.IceLib.Connection..::..StationSettings
The StationSettings for the connection.
completedCallback
Type: System.ComponentModel..::..AsyncCompletedEventHandler
The callback to invoke when the asynchronous operation completes.
userState
Type: System..::..Object
An optional object that contains state information for this request. This object is a way for the caller to store context information which will be provided to the AsyncCompleted event. If no context information is desired then nullNothingnullptra null reference (Nothing in Visual Basic) may be supplied.

Remarks

For security reasons a user can only be logged in to one station at a time. If the user logs in to a different station, the system drops the original station connection. Multiple instances of client applications may be run on the same machine using different user logins and the same station.

If a user who is logged in via Interaction Client .NET Edition tries, for example, to connect using Interaction Connect, they will receive a message at the original station such as: "Your connection has been dropped due to a subsequent login on a different station".

Changing a station from StationlessSettings to any other StationSettings-derived type that uses a station is not supported. Attempting to do so will result in an IceLibException. Additionally, changing station from a StationSettings-derived type that uses a station to StationlessSettings is also not supported. Starting with 2016 R1, this will now throw an appropriate IceLibException if attempted.

When completed, the completedCallback delegate is invoked on a thread appropriate to the application-model, such as the GUI thread in a UI application. The Error property of the AsyncCompletedEventArgs-derived object passed to the delegate will contain any exceptions thrown while executing the asynchronous task. See the synchronous version of this method for more detailed error information. For more information on async method calls, see How Async Calls Work.

Note
For more information on watches see How Watches Work.

Examples

The IceLib SDK includes example application references to the ChangeStationAsync method (or a variation). Some examples are listed below.
ProjectLocation
TutorialExampleChangeStationViewModel.cs, line 107, in ChangeStationViewModel.PerformLogin

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionA parameter is nullNothingnullptra null reference (Nothing in Visual Basic).
ININ.IceLib.Connection..::..RequestTimeoutExceptionThe request timed out while waiting for a response.
ININ.IceLib.Connection..::..SessionDisconnectedExceptionThe Session does not have a valid connection.
System..::..ObjectDisposedExceptionThe Session has been disposed.

Version Information

Supported for IC Server version 2015 R1 and beyond.
For 4.0, supported for IC Server version 4.0 GA and beyond.
For 3.0, supported for IC Server version 3.0 GA and beyond.

See Also