예제 #1
0
        public VsSolutionSelectionSpec(OpenSolution11Fixture fixture)
        {
            this.fixture = fixture;
            selection    = GlobalServices.Instance.GetServiceLocator().GetExport <IVsSolutionSelection>();
            explorer     = GlobalServices.Instance.GetServiceLocator().GetExport <ISolutionExplorer>();

            // Clear previous selections before running tests.
            fixture.Solution.Select(false);
        }
예제 #2
0
		public VsSolutionSelectionSpec (OpenSolution11Fixture fixture)
		{
			this.fixture = fixture;
			selection = GlobalServices.Instance.GetServiceLocator ().GetExport<IVsSolutionSelection> ();
			explorer = GlobalServices.Instance.GetServiceLocator ().GetExport<ISolutionExplorer> ();

			// Clear previous selections before running tests.
			fixture.Solution.Select (false);
		}
예제 #3
0
		public SolutionNodeFactory(
			[Import (typeof (SVsServiceProvider))] IServiceProvider services,
			Lazy<ISolutionExplorerNodeFactory> nodeFactory,
            IAdapterService adapter,
			IVsSolutionSelection selection,
			[Import (ContractNames.Interop.SolutionExplorerWindow)] Lazy<IVsUIHierarchyWindow> solutionExplorer)
		{
			this.services = services;
			this.nodeFactory = nodeFactory;
			this.adapter = adapter;
			this.selection = selection;
			this.solutionExplorer = solutionExplorer;
		}
예제 #4
0
 public SolutionNodeFactory(
     [Import(typeof(SVsServiceProvider))] IServiceProvider services,
     Lazy <ISolutionExplorerNodeFactory> nodeFactory,
     IAdapterService adapter,
     IVsSolutionSelection selection,
     [Import(ContractNames.Interop.SolutionExplorerWindow)] Lazy <IVsUIHierarchyWindow> solutionExplorer)
 {
     this.services         = services;
     this.nodeFactory      = nodeFactory;
     this.adapter          = adapter;
     this.selection        = selection;
     this.solutionExplorer = solutionExplorer;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SolutionNode"/> class.
 /// </summary>
 /// <param name="hierarchyNode">The underlying hierarchy represented by this node.</param>
 /// <param name="nodeFactory">The factory for child nodes.</param>
 /// <param name="adapter">The adapter service that implements the smart cast <see cref="ISolutionExplorerNode.As{T}"/>.</param>
 /// <param name="selection">The solution selection service.</param>
 /// <param name="solutionExplorer">The solution explorer window.</param>
 public SolutionNode(
     IServiceProvider services,
     IVsHierarchyItem hierarchyNode,
     ISolutionExplorerNodeFactory nodeFactory,
     IAdapterService adapter,
     IVsSolutionSelection selection,
     Lazy <IVsUIHierarchyWindow> solutionExplorer)
     : base(SolutionNodeKind.Solution, hierarchyNode, nodeFactory, adapter, solutionExplorer)
 {
     this.nodeFactory = nodeFactory;
     dteSolution      = new Lazy <Solution2> (() => (Solution2)services.GetService <DTE> ().Solution);
     this.selection   = selection;
     solution         = (IVsSolution2)hierarchyNode.HierarchyIdentity.Hierarchy;
 }