fixed the issues with restore options (#431)

* fixed the issues with restore options connecting to server without db name
This commit is contained in:
Leila Lali
2017-08-14 13:29:40 -07:00
committed by GitHub
parent cd870e6f15
commit 4b97aa8c43
13 changed files with 870 additions and 290 deletions

View File

@@ -73,19 +73,5 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer
}
return null;
}
/// <summary>
/// Check if the database is a system database
/// </summary>
/// <param name="databaseName">the name of database</param>
/// <returns>return true if the database is a system database</returns>
public static bool IsSystemDatabaseConnection(string databaseName)
{
return (string.IsNullOrWhiteSpace(databaseName) ||
string.Compare(databaseName, CommonConstants.MasterDatabaseName, StringComparison.OrdinalIgnoreCase) == 0 ||
string.Compare(databaseName, CommonConstants.MsdbDatabaseName, StringComparison.OrdinalIgnoreCase) == 0 ||
string.Compare(databaseName, CommonConstants.ModelDatabaseName, StringComparison.OrdinalIgnoreCase) == 0 ||
string.Compare(databaseName, CommonConstants.TempDbDatabaseName, StringComparison.OrdinalIgnoreCase) == 0);
}
}
}