예제 #1
0
 public BranchDiffFilter(
     IGitBranchDifferPackage package,
     string solutionPath,
     string solutionName,
     SVsServiceProvider serviceProvider,
     IVsHierarchyItemCollectionProvider vsHierarchyItemCollectionProvider)
 {
     this.package           = package;
     this.solutionDirectory = solutionPath;
     this.solutionFile      = solutionName;
     this.serviceProvider   = serviceProvider;
     this.vsHierarchyItemCollectionProvider = vsHierarchyItemCollectionProvider;
     this.Initialized     += BranchDiffFilter_Initialized;
     this.branchDiffWorker = DIContainer.Instance.GetService(typeof(GitBranchDiffController)) as GitBranchDiffController;
     Assumes.Present(this.branchDiffWorker);
 }
            public BranchDiffFilter(
                IGitBranchDifferPackage package,
                string solutionPath,
                IVsHierarchyItemCollectionProvider vsHierarchyItemCollectionProvider)
            {
                this.package           = package;
                this.solutionDirectory = solutionPath;
                this.vsHierarchyItemCollectionProvider = vsHierarchyItemCollectionProvider;
                this.Initialized += BranchDiffFilter_Initialized;

                // Dependencies that can be moved to constructor and resolved via IoC...
                this.branchDiffWorker    = DIContainer.Instance.GetService(typeof(GitBranchDiffController)) as GitBranchDiffController;
                this.branchDiffValidator = VsDIContainer.Instance.GetService(typeof(BranchDiffFilterValidator)) as BranchDiffFilterValidator;
                this.errorPresenter      = VsDIContainer.Instance.GetService(typeof(ErrorPresenter)) as ErrorPresenter;
                Assumes.Present(this.branchDiffWorker);
                Assumes.Present(this.branchDiffValidator);
                Assumes.Present(this.errorPresenter);
            }