| Visual Basic (Declaration) | |
|---|---|
Public Event ConnectionStateChanged As EventHandler(Of ConnectionStateChangedEventArgs) | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As EntityManager Dim handler As EventHandler(Of ConnectionStateChangedEventArgs) AddHandler instance.ConnectionStateChanged, handler | |
| C# | |
|---|---|
public event EventHandler<ConnectionStateChangedEventArgs> ConnectionStateChanged | |
| C++/CLI | |
|---|---|
public: event EventHandler<ConnectionStateChangedEventArgs^>^ ConnectionStateChanged | |
The event handler receives an argument of type ConnectionStateChangedEventArgs containing data related to this event. The following ConnectionStateChangedEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| IsConnected | Whether the EntityManager on which this event fired is now connected to an EntityServer. |
This event will fire when the EntityManager connects or disconnects from the Entity Server. A connect can occur implicitly, based on arguments to the constructor; or via a call to Connect or ConnectAsync. A disconnect can occur via a call to Disconnect or happen as the result of a communication failure during a request to the EntityServer.
Note that this event will not fire for a lost network connection, as the EntityManager does not monitor network availability. See the System.Net.NetworkInformation.NetworkChange class for more information on monitoring network events.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family