Show / Hide Table of Contents

# Class HostDetails

Contains details about the current host application (most likely the editor which is using the host process).

##### Inheritance

System.Object
HostDetails

##### 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.SqlContext

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

##### Syntax

    public class HostDetails

### Constructors

| Improve this Doc View Source

#### HostDetails(String, String, Version)

Creates an instance of the HostDetails class.

##### Declaration

    public HostDetails(string name = null, string profileId = null, Version version = null)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | name | The display name for the host, typically in the form of "[Application Name] Host".
System.String | profileId | The identifier of the SqlTools host to use for its profile path. loaded. Used to resolve a profile path of the form 'X_profile.ps1' where 'X' represents the value of hostProfileId. If null, a default will be used.
System.Version | version | The host application's version.

### Fields

| Improve this Doc View Source

#### Default

The default host details in a HostDetails object.

##### Declaration

    public static readonly HostDetails Default

##### Field Value

Type | Description
--- | ---
HostDetails |

| Improve this Doc View Source

#### DefaultHostName

The default host name for SqlTools Editor Services. Used if no host name is specified by the host application.

##### Declaration

    public const string DefaultHostName = "SqlTools Service Host"

##### Field Value

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

| Improve this Doc View Source

#### DefaultHostProfileId

The default host ID for SqlTools Editor Services. Used for the host-specific profile path if no host ID is specified.

##### Declaration

    public const string DefaultHostProfileId = "Microsoft.SqlToolsServiceHost"

##### Field Value

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

| Improve this Doc View Source

#### DefaultHostVersion

The default host version for SqlTools Editor Services. If no version is specified by the host application, we use 0.0.0 to indicate a lack of version.

##### Declaration

    public static readonly Version DefaultHostVersion

##### Field Value

Type | Description
--- | ---
System.Version |

### Properties

| Improve this Doc View Source

#### Name

Gets the name of the host.

##### Declaration

    public string Name { get; }

##### Property Value

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

| Improve this Doc View Source

#### ProfileId

Gets the profile ID of the host, used to determine the host-specific profile path.

##### Declaration

    public string ProfileId { get; }

##### Property Value

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

| Improve this Doc View Source

#### Version

Gets the version of the host.

##### Declaration

    public Version Version { get; }

##### Property Value

Type | Description
--- | ---
System.Version |