public ProjectBuilder2015(
     IVsSolutionBuildManager2 buildManager,
     IVSThreadingService threadingService,
     IProjectMapper projectMapper)
     : base(buildManager, threadingService, projectMapper)
 {
 }
        public BuildsOverviewViewModel(IBuildsProvider buildsProvider, IProjectMapper projectMapper, IBuildsMapper buildsMapper, IConfigManager configManager)
        {
            _buildsProvider = buildsProvider;
            _projectMapper  = projectMapper;
            _buildsMapper   = buildsMapper;
            _configManager  = configManager;

            _serverConfig = _configManager.Get <DevOpsServerConfig>();
            _lastRefresh  = DateTimeOffset.Now - _serverConfig.AgeOfBuilds;

            BindingOperations.EnableCollectionSynchronization(Projects, _projectsLock);
            BindingOperations.EnableCollectionSynchronization(Builds, _buildLock);

            BuildsCollectionView = new ListCollectionView(Builds)
            {
                Filter           = FilterBuild,
                SortDescriptions =
                {
                    new SortDescription(nameof(BuildViewModel.ChangedAt), ListSortDirection.Descending)
                }
            };

            _buildRefreshTimer.Tick += BuildRefreshTimerTickHandler;

            _refreshTimePropertiesTimer.Interval = TimeSpan.FromSeconds(1);
            _refreshTimePropertiesTimer.Tick    += RefreshTimePropertiesTickHandler;
            _refreshTimePropertiesTimer.Start();
        }
예제 #3
0
 public DefaultProjectBuilder(
     IVsSolutionBuildManager2 buildManager,
     IProjectMapper projectMapper)
 {
     ProjectMapper = projectMapper;
     _buildManager = buildManager;
 }
예제 #4
0
 public ProjectController([FromServices] IProjectRepository repository, IProjectMapper mapper, UserManager <User> userManager, IDepartmentRepository departmentRepository, IUserRepository userRepository)
 {
     _projectRepository    = repository;
     _departmentRepository = departmentRepository;
     _userRepository       = userRepository;
     _mapper      = mapper;
     _userManager = userManager;
 }
예제 #5
0
 public DefaultProjectBuilder(
     IVsSolutionBuildManager2 buildManager,
     IVSThreadingService threadingService,
     IProjectMapper projectMapper)
 {
     _projectMapper    = projectMapper;
     _threadingService = threadingService;
     _buildManager     = buildManager;
 }
 public ProjectsController(IExceptionManager exceptionManager,
                           IProjectManager projectManager,
                           IProjectMapper projectMapper,
                           ILogger <ProjectsController> logger)
 {
     this.exceptionManager = exceptionManager;
     this.projectManager   = projectManager;
     this.projectMapper    = projectMapper;
     this.logger           = logger;
 }
예제 #7
0
 public CodeNoteMapper(IGeneralSubjectMapper generalSubjectMapper, INoteTypeMapper noteTypeMapper,
                       IUserMapper userMapper,
                       IProjectMapper projectMapper, ISpecificSubjectMapper specificSubjectMapper)
 {
     _generalSubjectMapper = generalSubjectMapper;
     _noteTypeMapper       = noteTypeMapper;
     _userMapper           = userMapper;
     _projectMapper        = projectMapper;
     //_codeNoteDetailMapper = codeNoteDetailMapper;
     _specificSubjectMapper = specificSubjectMapper;
 }
예제 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProjectHelper"/> class.
 /// </summary>
 /// <param name="context">The timesheet database context.</param>
 /// <param name="repositoryAccessors">The instance of repository accessors.</param>
 /// <param name="projectMapper">The instance of project model mapper.</param>
 /// <param name="memberMapper">Instance of member mapper.</param>
 /// <param name="taskMapper">Instance of task mapper.</param>
 public ProjectHelper(
     TimesheetContext context,
     IRepositoryAccessors repositoryAccessors,
     IProjectMapper projectMapper,
     IMemberMapper memberMapper,
     ITaskMapper taskMapper)
 {
     this.context             = context;
     this.repositoryAccessors = repositoryAccessors;
     this.projectMapper       = projectMapper;
     this.memberMapper        = memberMapper;
     this.taskMapper          = taskMapper;
 }
예제 #9
0
 public ProjectDataService(ITeamCityClient teamCityClient, IProjectMapper projectMapper)
 {
     if (teamCityClient == null)
     {
         throw new ArgumentNullException(nameof(teamCityClient));
     }
     if (projectMapper == null)
     {
         throw new ArgumentNullException(nameof(projectMapper));
     }
     _teamCityClient = teamCityClient;
     _projectMapper  = projectMapper;
 }
예제 #10
0
        public MainViewModel(IFilePicker filePicker, IProjectMapper mapper,
                             IProjectStore projectStore, ImportExtensionsViewModel importViewModel, IDesignContext designContext)
        {
            DesignContext     = designContext;
            this.mapper       = mapper;
            this.projectStore = projectStore;

            var saveExtensions = new[]
            {
                new KeyValuePair <string, IList <string> >(Constants.FileFormatName,
                                                           new List <string> {
                    Constants.FileFormatExtension
                })
            };

            Load = ReactiveCommand.CreateFromObservable(() =>
                                                        LoadProject(filePicker, new[] { Constants.FileFormatExtension }));

            New = ReactiveCommand.Create(CreateNewDocument);

            Save = ReactiveCommand.CreateFromObservable(() => SaveProject(filePicker, Project, saveExtensions));

            LoadFromFile =
                ReactiveCommand.CreateFromTask <ZafiroFile, Domain.Models.Project>(zafiroFile =>
                                                                                   LoadProject(zafiroFile, projectStore));

            var projects = Load
                           .Merge(New)
                           .Merge(LoadFromFile)
                           .Merge(importViewModel.ImportedProjects)
                           .Do(_ => IsImportVisible = false);

            project = projects
                      .Select(mapper.Map)
                      .Do(x => x.SelectedDocument = x.Documents.FirstOrDefault())
                      .ToProperty(this, model => model.Project);

            isBusy = Load.IsExecuting
                     .Merge(Save.IsExecuting)
                     .Merge(importViewModel.IsBusy)
                     .Merge(LoadFromFile.IsExecuting)
                     .ToProperty(this, x => x.IsBusy);

            New.Execute().Subscribe();

            ShowImport = ReactiveCommand.Create(() => IsImportVisible = true);
            HideImport = ReactiveCommand.Create(() => IsImportVisible = false);
            align      = this.WhenAnyObservable(x => x.Project.SelectedDocument.AlignChanged).ToProperty(this, x => x.Align);
        }
 public ProjectAnalyzer(
     IVsApiPortAnalyzer analyzer,
     IErrorListProvider errorList,
     ISourceLineMapper sourceLineMapper,
     IFileWriter reportWriter,
     IFileSystem fileSystem,
     IProjectBuilder builder,
     IProjectMapper projectMapper,
     IVSThreadingService threadingService)
 {
     _analyzer         = analyzer;
     _sourceLineMapper = sourceLineMapper;
     _reportWriter     = reportWriter;
     _fileSystem       = fileSystem;
     _builder          = builder;
     _errorList        = errorList;
     _projectMapper    = projectMapper;
     _threadingService = threadingService;
 }
예제 #12
0
 public ProjectAnalyzer(
     IVsApiPortAnalyzer analyzer,
     IErrorListProvider errorList,
     ISourceLineMapper sourceLineMapper,
     IFileWriter reportWriter,
     IOutputWindowWriter outputWindowWriter,
     IFileSystem fileSystem,
     IProjectBuilder builder,
     IProjectMapper projectMapper)
 {
     _analyzer           = analyzer;
     _sourceLineMapper   = sourceLineMapper;
     _reportWriter       = reportWriter;
     _fileSystem         = fileSystem;
     _builder            = builder;
     _errorList          = errorList;
     _projectMapper      = projectMapper;
     _outputWindowWriter = outputWindowWriter;
 }
예제 #13
0
 public SolutionMapper(IProjectMapper projectMapper, AnalysisWorkspace workspace)
 {
     _projectMapper = projectMapper;
     _workspace     = workspace;
 }
예제 #14
0
 public ProjectDataService(ITeamCityClient teamCityClient, IProjectMapper projectMapper)
 {
     _teamCityClient = teamCityClient ?? throw new ArgumentNullException(nameof(teamCityClient));
     _projectMapper  = projectMapper ?? throw new ArgumentNullException(nameof(projectMapper));
 }
예제 #15
0
 public ProjectBuilder(IBuildServices buildServices, IProjectMapper projectMapper)
     : base(buildServices.BuildManager, projectMapper)
 {
 }