Exemple #1
0
        ISolution CreateSolution()
        {
            IFileService          fileService   = MockRepository.GenerateStub <IFileService>();
            IProjectChangeWatcher changeWatcher = MockRepository.GenerateStub <IProjectChangeWatcher>();

            return(new Solution(FileName.Create(@"d:\projects\MyProject\MySolution.sln"), changeWatcher, fileService));
        }
        void CreateSolution(params IProject[] projects)
        {
            IProjectChangeWatcher watcher = MockRepository.GenerateStub <IProjectChangeWatcher>();

            solution = new Solution(watcher);
            projects.ForEach(p => solution.Folders.Add(p));
        }
        public Solution(FileName fileName, IProjectChangeWatcher changeWatcher, IFileService fileService)
        {
            this.changeWatcher      = changeWatcher;
            this.fileService        = fileService;
            this.ConfigurationNames = new SolutionConfigurationOrPlatformNameCollection(this, false);
            this.PlatformNames      = new SolutionConfigurationOrPlatformNameCollection(this, true);
            this.projects           = new SynchronizedModelCollection <IProject>(new ProjectModelCollection(this));
            this.FileName           = fileName;
            base.Name = fileName.GetFileNameWithoutExtension();

            this.globalSections = new SynchronizedModelCollection <SolutionSection>(new NullSafeSimpleModelCollection <SolutionSection>());
            globalSections.CollectionChanged += OnSolutionSectionCollectionChanged;

            fileService.FileRenamed += FileServiceFileRenamed;
            fileService.FileRemoved += FileServiceFileRemoved;
            changeWatcher.Enable();
        }
Exemple #4
0
		public Solution(IProjectChangeWatcher changeWatcher)
		{
			preferences = new SolutionPreferences(this);
			this.MSBuildProjectCollection = new Microsoft.Build.Evaluation.ProjectCollection();
			this.changeWatcher = changeWatcher;
		}
Exemple #5
0
        void CreateSolution()
        {
            IProjectChangeWatcher fakeWatcher = MockRepository.GenerateStub <IProjectChangeWatcher>();

            solution = new Solution(fakeWatcher);
        }