Add ability to create sessions from templates, and list existing sessions (#671)

* Initial changes to connect to existing sessions

* Creating new profiler sessions

* Some session template changes

* Fixing errors

* Cleaning up comments, string constants, and formatting

* Removing commented code
This commit is contained in:
Madeline MacDonald
2018-08-02 12:50:26 -07:00
committed by GitHub
parent e8360ef68e
commit 4b9807f0cf
14 changed files with 406 additions and 117 deletions

View File

@@ -400,7 +400,21 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Profiler
public class TestXEventSessionFactory : IXEventSessionFactory
{
private int sessionNum = 1;
public IXEventSession GetOrCreateXEventSession(string template, ConnectionInfo connInfo)
public IXEventSession GetXEventSession(string sessionName, ConnectionInfo connInfo)
{
if(sessionNum == 1)
{
sessionNum = 2;
return new TestXEventSession1();
}
else
{
sessionNum = 1;
return new TestXEventSession2();
}
}
public IXEventSession CreateXEventSession(string createStatement, string sessionName, ConnectionInfo connInfo)
{
if(sessionNum == 1)
{