提交 59c7316a 编写于 作者: J JieCarolHu

use MEF to get EventHookupSessionManager

上级 d4549ca1
......@@ -10,7 +10,6 @@
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.VisualStudio.Composition;
using Microsoft.VisualStudio.Text.Adornments;
using Roslyn.Utilities;
using Xunit;
......@@ -26,7 +25,7 @@ public EventHookupTestState(XElement workspaceElement, IDictionary<OptionKey, ob
{
_commandHandler = new EventHookupCommandHandler(Workspace.GetService<IInlineRenameService>(),
Workspace.ExportProvider.GetExportedValue<IAsynchronousOperationListenerProvider>(),
new EventHookupSessionManager(Workspace.GetService<IToolTipService>()));
Workspace.ExportProvider.GetExportedValue<EventHookupSessionManager>());
_testSessionHookupMutex = new Mutex(false);
_commandHandler.TESTSessionHookupMutex = _testSessionHookupMutex;
......@@ -35,7 +34,7 @@ public EventHookupTestState(XElement workspaceElement, IDictionary<OptionKey, ob
private static ComposableCatalog GetExtraParts()
{
return MinimalTestExportProvider.CreateTypeCatalog(new[] { typeof(EventHookupCommandHandler) });
return MinimalTestExportProvider.CreateTypeCatalog(new[] { typeof(EventHookupCommandHandler), typeof(EventHookupSessionManager) });
}
public static EventHookupTestState CreateTestState(string markup, IDictionary<OptionKey, object> options = null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册