public async Task InitializeAsync() { var logger = new NullLogger(); this.powerShellContext = PowerShellContextFactory.Create(logger); await this.powerShellContext.ImportCommandsModule(@"..\..\..\..\..\module\PowerShellEditorServices\Commands"); this.extensionService = new ExtensionService(this.powerShellContext); this.editorOperations = new TestEditorOperations(); this.extensionService.CommandAdded += ExtensionService_ExtensionAdded; this.extensionService.CommandUpdated += ExtensionService_ExtensionUpdated; this.extensionService.CommandRemoved += ExtensionService_ExtensionRemoved; await this.extensionService.Initialize(this.editorOperations); var filePath = @"c:\Test\Test.ps1"; this.currentFile = new ScriptFile(filePath, filePath, "This is a test file", new Version("5.0")); this.commandContext = new EditorContext( this.editorOperations, currentFile, new BufferPosition(1, 1), BufferRange.None); }
public async Task InitializeAsync() { var logger = Logging.NullLogger; this.powerShellContext = PowerShellContextFactory.Create(logger); await this.powerShellContext.ImportCommandsModuleAsync( TestUtilities.NormalizePath("../../../../../module/PowerShellEditorServices/Commands")); this.extensionService = new ExtensionService(this.powerShellContext); this.editorOperations = new TestEditorOperations(); this.extensionService.CommandAdded += ExtensionService_ExtensionAdded; this.extensionService.CommandUpdated += ExtensionService_ExtensionUpdated; this.extensionService.CommandRemoved += ExtensionService_ExtensionRemoved; await this.extensionService.InitializeAsync( this.editorOperations, new ComponentRegistry()); var filePath = TestUtilities.NormalizePath("c:/Test/Test.ps1"); this.currentFile = new ScriptFile(filePath, filePath, "This is a test file", new Version("5.0")); this.commandContext = new EditorContext( this.editorOperations, currentFile, new BufferPosition(1, 1), BufferRange.None); }
public async Task InitializeAsync() { this.powerShellContext = new PowerShellContext(); this.extensionService = new ExtensionService(this.powerShellContext); this.editorOperations = new TestEditorOperations(); this.extensionService.CommandAdded += ExtensionService_ExtensionAdded; this.extensionService.CommandUpdated += ExtensionService_ExtensionUpdated; this.extensionService.CommandRemoved += ExtensionService_ExtensionRemoved; await this.extensionService.Initialize(this.editorOperations); var filePath = @"c:\Test\Test.ps1"; this.currentFile = new ScriptFile(filePath, filePath, "This is a test file", new Version("5.0")); this.commandContext = new EditorContext( this.editorOperations, currentFile, new BufferPosition(1, 1), BufferRange.None); }