mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 17:24:26 -05:00
Use MemoryStream instead of stdout for outgoing messages during integration tests (#1696)
* filter * test * run all * Redirect to memorystream * revert temp changes
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Channel;
|
||||
@@ -68,12 +69,12 @@ namespace Microsoft.SqlTools.Hosting.Protocol
|
||||
/// <summary>
|
||||
/// Initializes
|
||||
/// </summary>
|
||||
public void Initialize()
|
||||
public void Initialize(Stream inputStream = null, Stream outputStream = null)
|
||||
{
|
||||
if (!this.isInitialized)
|
||||
{
|
||||
// Start the provided protocol channel
|
||||
this.protocolChannel.Start(this.messageProtocolType);
|
||||
this.protocolChannel.Start(this.messageProtocolType, inputStream, outputStream);
|
||||
|
||||
// Start the message dispatcher
|
||||
this.MessageDispatcher = new MessageDispatcher(this.protocolChannel);
|
||||
|
||||
Reference in New Issue
Block a user