public ShowChangesetItemsModel(WorkItemSelectionService workItemSelectionService, WorkItemCollector workItemCollector,
     WorkItemStore workItemStore, VersionControlServer versionControlServer, IVisualStudioAdapter visualStudioAdapter)
 {
     this.workItemSelectionService = workItemSelectionService;
     this.workItemCollector = workItemCollector;
     this.workItemStore = workItemStore;
     this.versionControlServer = versionControlServer;
     this.visualStudioAdapter = visualStudioAdapter;
 }
 public ShowChangesetItemsModel(WorkItemSelectionService workItemSelectionService, WorkItemCollector workItemCollector,
                                WorkItemStore workItemStore, VersionControlServer versionControlServer, IVisualStudioAdapter visualStudioAdapter)
 {
     this.workItemSelectionService = workItemSelectionService;
     this.workItemCollector        = workItemCollector;
     this.workItemStore            = workItemStore;
     this.versionControlServer     = versionControlServer;
     this.visualStudioAdapter      = visualStudioAdapter;
 }
        private void ShowAffectedChangesetFiles()
        {
            TfsTeamProjectCollection tpc = visualStudioAdapter.GetCurrent();
            var workItemStore = tpc.GetService<WorkItemStore>();
            var versionControlServer = tpc.GetService<VersionControlServer>();
            var workItemCollector = new WorkItemCollector(workItemStore);
            var model = new ShowChangesetItemsModel(workItemSelectionService, workItemCollector, workItemStore, versionControlServer, visualStudioAdapter);

            var dte = (EnvDTE.DTE)Package.GetGlobalService(typeof(EnvDTE.DTE));
            var view = new ShowChangesetItemsView(dte);

            view.ConnectTo(model);

            model.Execute();
        }