Share via


DataConnectionState Enumeration

Specifies the state of a specified data connection.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'Declaration
<FlagsAttribute> _
Public Enumeration DataConnectionState
[FlagsAttribute]
public enum DataConnectionState
[FlagsAttribute]
public enum class DataConnectionState
[<FlagsAttribute>]
type DataConnectionState
public enum DataConnectionState

Members

Member name Description
Closed The data connection is closed.
Open The data connection is open.
Broken The data connection was previously open, but has been broken for unknown reasons.

Remarks

A connection may be "broken" under any number of circumstances; for example, a computer running Visual Studio with an open connection that is disconnected from the network would cause the connection to fall into a broken state.

Note

The only possible interaction with a connection in the broken state is to close it.

This value can not change on its own; rather, it is set as the result of attempting to act on the connection, such as open it, execute a command against it, or close it.

Note, too, that a connection typically only gets into the broken state due to an attempt to interact with it. For example, a connection can remain in the Open state after disconnecting the network cable, but the next time you attempt to execute a command it would move into the Broken state. This points out how it is not normally possible to know with certainty whether a connection is broken.

See Also

Reference

Microsoft.VisualStudio.Data Namespace

DataConnection