diff --git a/src/OmniSharp.Roslyn/OmniSharpWorkspace.cs b/src/OmniSharp.Roslyn/OmniSharpWorkspace.cs index eb6f941727..c3be40bc63 100644 --- a/src/OmniSharp.Roslyn/OmniSharpWorkspace.cs +++ b/src/OmniSharp.Roslyn/OmniSharpWorkspace.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Host; using Microsoft.CodeAnalysis.Text; using Microsoft.Extensions.Logging; using OmniSharp.FileSystem; @@ -50,7 +51,12 @@ public bool Initialized [ImportingConstructor] public OmniSharpWorkspace(HostServicesAggregator aggregator, ILoggerFactory loggerFactory, IFileSystemWatcher fileSystemWatcher) - : base(aggregator.CreateHostServices(), "Custom") + : this(aggregator.CreateHostServices(), loggerFactory, fileSystemWatcher) + { + } + + public OmniSharpWorkspace(HostServices hostServices, ILoggerFactory loggerFactory, IFileSystemWatcher fileSystemWatcher) + : base(hostServices, "Custom") { BufferManager = new BufferManager(this, loggerFactory, fileSystemWatcher); _logger = loggerFactory.CreateLogger();