예제 #1
0
        public static IVisualStudioInstance ToMockVs(this SolutionFile self)
        {
            MockVs vs = new MockVs();

            vs.Invoke(() => ErrorHandler.ThrowOnFailure(vs.Solution.OpenSolutionFile(0, self.Filename)));
            return(vs);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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
                };
            }
        }
예제 #5
0
 public MockVsUIShell(MockVs instance)
 {
     _instance = instance;
 }
예제 #6
0
 public MockVsMonitorSelection(MockVs vs)
 {
     _vs       = vs;
     _emptyCtx = new MockVsTrackSelectionEx(this);
 }
예제 #7
0
 public MockTreeNode(MockVs mockVs, HierarchyItem res)
 {
     _mockVs = mockVs;
     _item   = res;
 }
예제 #8
0
 public MockVsUIHierarchyWindow(MockVs vs)
 {
     _mockVs = vs;
 }
 public MockVsRunningDocumentTable(MockVs vs)
 {
     _vs = vs;
 }
예제 #10
0
 public MockDialog(MockVs vs, string title)
 {
     Title = title;
     Vs    = vs;
 }
예제 #11
0
파일: MockVs.cs 프로젝트: xyongy/PTVS
 public MockSyncContext(MockVs vs)
 {
     _vs = vs;
 }
예제 #12
0
파일: MockVs.cs 프로젝트: xyongy/PTVS
 public SelectionEvents(MockVs vs)
 {
     _vs = vs;
 }
예제 #13
0
 public MockVsServiceProvider(MockVs mockVs)
 {
     _vs = mockVs;
     _servicesByGuid.Add(typeof(IOleServiceProvider).GUID, this);
 }
예제 #14
0
 public MockDTE(MockVs vs)
 {
     _vs = vs;
 }
 public MockVsServiceProvider(MockVs mockVs)
 {
     _vs = mockVs;
     _servicesByType.Add(typeof(IOleServiceProvider), this);
 }
예제 #16
0
 public MockVsMonitorSelection(MockVs vs)
 {
     _vs = vs;
 }