C# Класс Wix.SonarQube.SqlServerHelper

Показать файл Открыть проект

Открытые методы

Метод Описание
CreateSqlConnectionWithSqlLogin ( string dataSource, string username, string password, string databaseName = null ) : SqlConnection

Creates sql connection object with sql login

CreateSqlConnectionWithWindowsLogin ( string dataSource, string databaseName = null ) : SqlConnection

Create SqlConnection object for windows authentication

IsSqlServerInstalled ( ) : bool

Checks if sql is already installed on the machine

TestSqlConnectionWithSqlServerLogin ( string dataSource, string username, string password ) : bool

Tries to connect to sql database with user provided credentials

TestSqlServerConnectionWithWindowsLogin ( string dataSource ) : bool

Tries to connect to sql database with windows login.

Приватные методы

Метод Описание
CheckSqlServer ( RegistryKey instanceKey ) : bool

Описание методов

CreateSqlConnectionWithSqlLogin() публичный статический Метод

Creates sql connection object with sql login
public static CreateSqlConnectionWithSqlLogin ( string dataSource, string username, string password, string databaseName = null ) : SqlConnection
dataSource string
username string
password string
databaseName string
Результат System.Data.SqlClient.SqlConnection

CreateSqlConnectionWithWindowsLogin() публичный статический Метод

Create SqlConnection object for windows authentication
public static CreateSqlConnectionWithWindowsLogin ( string dataSource, string databaseName = null ) : SqlConnection
dataSource string
databaseName string
Результат System.Data.SqlClient.SqlConnection

IsSqlServerInstalled() публичный статический Метод

Checks if sql is already installed on the machine
public static IsSqlServerInstalled ( ) : bool
Результат bool

TestSqlConnectionWithSqlServerLogin() публичный статический Метод

Tries to connect to sql database with user provided credentials
public static TestSqlConnectionWithSqlServerLogin ( string dataSource, string username, string password ) : bool
dataSource string
username string
password string
Результат bool

TestSqlServerConnectionWithWindowsLogin() публичный статический Метод

Tries to connect to sql database with windows login.
public static TestSqlServerConnectionWithWindowsLogin ( string dataSource ) : bool
dataSource string
Результат bool