-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathOutputCaptor.cs
More file actions
36 lines (31 loc) · 1008 Bytes
/
Copy pathOutputCaptor.cs
File metadata and controls
36 lines (31 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Data;
namespace tSQLtCLR
{
class OutputCaptor
{
private TestDatabaseFacade testDatabaseFacade;
public OutputCaptor(TestDatabaseFacade testDatabaseFacade)
{
this.testDatabaseFacade = testDatabaseFacade;
}
internal void CaptureOutputToLogTable(System.Data.SqlTypes.SqlString command)
{
ExecuteCommand(command);
testDatabaseFacade.logCapturedOutput(testDatabaseFacade.InfoMessage);
}
internal void SuppressOutput(System.Data.SqlTypes.SqlString command)
{
ExecuteCommand(command);
}
internal void ExecuteCommand(System.Data.SqlTypes.SqlString command)
{
SqlDataReader reader = testDatabaseFacade.executeCommand(command);
reader.Close();
}
}
}