mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-20 09:35:38 -05:00
Address error IDE0270 after MsBuild update (#1865)
This commit is contained in:
@@ -308,14 +308,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Profiler
|
||||
var sqlConnection = ConnectionService.OpenSqlConnection(connInfo);
|
||||
SqlStoreConnection connection = new SqlStoreConnection(sqlConnection);
|
||||
BaseXEStore store = CreateXEventStore(connInfo, connection);
|
||||
Session session = store.Sessions[sessionName];
|
||||
Session session = store.Sessions[sessionName] ?? throw new Exception(SR.SessionNotFound);
|
||||
|
||||
// start the session if it isn't already running
|
||||
if (session == null)
|
||||
{
|
||||
throw new Exception(SR.SessionNotFound);
|
||||
}
|
||||
|
||||
if (session != null && !session.IsRunning)
|
||||
{
|
||||
session.Start();
|
||||
|
||||
Reference in New Issue
Block a user