Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide constructor accepting hostServices #2373

Merged
merged 7 commits into from
Apr 7, 2022
Merged
8 changes: 7 additions & 1 deletion src/OmniSharp.Roslyn/OmniSharpWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<OmniSharpWorkspace>();
Expand Down