public static IVisualStudioInstance ToMockVs(this SolutionFile self) { MockVs vs = new MockVs(); vs.Invoke(() => ErrorHandler.ThrowOnFailure(vs.Solution.OpenSolutionFile(0, self.Filename))); return(vs); }
public MockVsTextView(IServiceProvider serviceProvier, MockVs vs, MockTextView view) { _view = view; _serviceProvider = serviceProvier; _vs = vs; var compModel = (IComponentModel)_serviceProvider.GetService(typeof(SComponentModel)); var editorOpsFact = compModel.GetService <IEditorOperationsFactoryService>(); _editorOps = editorOpsFact.GetEditorOperations(_view); _commandTarget = new EditorCommandTarget(this); }
public static IVisualStudioInstance ToMockVs(this SolutionFile self) { MockVs vs = new MockVs(); vs.Invoke(() => { // HACK: The default targets files require a function that we don't provide // The tests are mostly still broken, but they get further now. We should probably // move them into UI tests, as we can't emulate the MSBuild environment well enough // to open projects from here. Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.SetGlobalProperty("NugetRestoreTargets", "false"); ErrorHandler.ThrowOnFailure(vs.Solution.OpenSolutionFile(0, self.Filename)); }); return(vs); }
public MockVsTextManager(MockVs vs) { _vs = vs; foreach (var langService in MockVs.CachedInfo.LangServicesByGuid) { var type = langService.Value.Attribute; _langPrefs[langService.Key] = new LANGPREFERENCES2() { guidLang = langService.Key, fDropdownBar = (uint)(type.ShowDropDownOptions ? 1 : 0), fInsertTabs = (uint)(type.DefaultToInsertSpaces ? 0 : 1), fShowCompletion = (uint)(type.ShowCompletion ? 1 : 0), fShowSmartIndent = (uint)(type.ShowSmartIndent ? 1 : 0), fHideAdvancedAutoListMembers = (uint)(type.HideAdvancedMembersByDefault ? 1 : 0), fAutoListMembers = 1, fAutoListParams = 1, IndentStyle = type.ShowSmartIndent ? vsIndentStyle.vsIndentStyleSmart : vsIndentStyle.vsIndentStyleDefault }; } }
public MockVsUIShell(MockVs instance) { _instance = instance; }
public MockVsMonitorSelection(MockVs vs) { _vs = vs; _emptyCtx = new MockVsTrackSelectionEx(this); }
public MockTreeNode(MockVs mockVs, HierarchyItem res) { _mockVs = mockVs; _item = res; }
public MockVsUIHierarchyWindow(MockVs vs) { _mockVs = vs; }
public MockVsRunningDocumentTable(MockVs vs) { _vs = vs; }
public MockDialog(MockVs vs, string title) { Title = title; Vs = vs; }
public MockSyncContext(MockVs vs) { _vs = vs; }
public SelectionEvents(MockVs vs) { _vs = vs; }
public MockVsServiceProvider(MockVs mockVs) { _vs = mockVs; _servicesByGuid.Add(typeof(IOleServiceProvider).GUID, this); }
public MockDTE(MockVs vs) { _vs = vs; }
public MockVsServiceProvider(MockVs mockVs) { _vs = mockVs; _servicesByType.Add(typeof(IOleServiceProvider), this); }
public MockVsMonitorSelection(MockVs vs) { _vs = vs; }