Show / Hide Table of Contents

# Class ConnectionInfo

Information pertaining to a unique connection instance.

##### Inheritance

System.Object
ConnectionInfo

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()

###### Namespace:Microsoft.SqlTools.ServiceLayer.Connection

###### Assembly:Microsoft.SqlTools.ServiceLayer.dll

##### Syntax

    public class ConnectionInfo

### Constructors

| Improve this Doc View Source

#### ConnectionInfo(ISqlConnectionFactory, String, ConnectionDetails)

Constructor

##### Declaration

    public ConnectionInfo(ISqlConnectionFactory factory, string ownerUri, ConnectionDetails details)

##### Parameters

Type | Name | Description
--- | --- | ---
ISqlConnectionFactory | factory |
System.String | ownerUri |
ConnectionDetails | details |

### Properties

| Improve this Doc View Source

#### ConnectionDetails

Properties used for creating/opening the SQL connection.

##### Declaration

    public ConnectionDetails ConnectionDetails { get; }

##### Property Value

Type | Description
--- | ---
ConnectionDetails |

| Improve this Doc View Source

#### ConnectionId

Unique Id, helpful to identify a connection info object

##### Declaration

    public Guid ConnectionId { get; }

##### Property Value

Type | Description
--- | ---
System.Guid |

| Improve this Doc View Source

#### Factory

Factory used for creating the SQL connection associated with the connection info.

##### Declaration

    public ISqlConnectionFactory Factory { get; }

##### Property Value

Type | Description
--- | ---
ISqlConnectionFactory |

| Improve this Doc View Source

#### IntellisenseMetrics

Intellisense Metrics

##### Declaration

    public InteractionMetrics<double> IntellisenseMetrics { get; }

##### Property Value

Type | Description
--- | ---
InteractionMetrics<System.Double> |

| Improve this Doc View Source

#### IsAzure

Returns true is the db connection is to a SQL db

##### Declaration

    public bool IsAzure { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### OwnerUri

URI identifying the owner/user of the connection. Could be a file, service, resource, etc.

##### Declaration

    public string OwnerUri { get; }

##### Property Value

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### SqlConnection

The connection to the SQL database that commands will be run against.

##### Declaration

    public DbConnection SqlConnection { get; set; }

##### Property Value

Type | Description
--- | ---
System.Data.Common.DbConnection |