public WebpackController(IScriptsGenerator scriptsGenerator, IFileRepository fileRepositor,
                          IBuildRepository buildRepository)
 {
     ScriptsGenerator = scriptsGenerator;
     FileRepository   = fileRepositor;
     BuildRepository  = buildRepository;
 }
 public TaskBrowser(ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
     : base(taskRepository, sourceRepository, shelvesetRepository, buildRepository)
 {
     InitializeComponent();
     taskGrid.Grid.MultiSelect = false;
     this.ExecuteLater(10, () => SwitchCurrentTab(true));
 }
示例#3
0
 public BuildsController(IBuildRepository buildRepo, IEngineRepository engineRepo, EngineService engineService,
                         IOptions <EngineOptions> options)
 {
     _buildRepo     = buildRepo;
     _engineService = engineService;
     _options       = options;
 }
 public BuildsController(IDocumentStore store, IBuildRepository buildRepository, ProcedureExecutor procedureExecutor, IMessageSubscriber messageSubscriber)
 {
     this.store = store;
     this.buildRepository = buildRepository;
     this.procedureExecutor = procedureExecutor;
     this.messageSubscriber = messageSubscriber;
 }
示例#5
0
 public TransactionsController(ILog log,
                               ISequenceService sequenceService,
                               IBuildRepository buildRepository)
 {
     _log             = log;
     _sequenceService = sequenceService;
     _buildRepository = buildRepository;
 }
示例#6
0
 public TransactionsController(ILogFactory logFactory,
                               IDashService dashService,
                               IBuildRepository buildRepository)
 {
     _log             = logFactory.CreateLog(this);
     _dashService     = dashService;
     _buildRepository = buildRepository;
 }
示例#7
0
		public BuildManager(IBuildRepository buildRepository, IFileRepository fileRepository, IProjectRepository projectRepository, IProjectNotifier projectNotifier, IManifestBuilder manifestBuilder)
		{
			_fileRepository = DIHelper.VerifyParameter(fileRepository);
			_buildRepository = DIHelper.VerifyParameter(buildRepository);
			_projectRepository = DIHelper.VerifyParameter(projectRepository);
			_projectNotifier = DIHelper.VerifyParameter(projectNotifier);
            _manifestBuilder = DIHelper.VerifyParameter(manifestBuilder);
		}
 public BuildInspector(ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
     : base(taskRepository, sourceRepository, shelvesetRepository, buildRepository)
 {
     InitializeComponent();
     logViewer.InitializeDefaults();
     logViewer.IsReadOnly = true;
     logViewer.LongLines.EdgeMode = EdgeMode.None;
 }
        public RevisionBrowser(ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
            : base(taskRepository, sourceRepository, shelvesetRepository, buildRepository)
        {
            _revisionInspector = new RevisionInspector(taskRepository, sourceRepository, shelvesetRepository, buildRepository);

            InitializeComponent();
            activityRevisions.Grid.MultiSelect = false;
        }
示例#10
0
 public TransactionsController(ILog log,
                               IDynamicService dynamicService,
                               IBuildRepository buildRepository)
 {
     _log             = log;
     _dynamicService  = dynamicService;
     _buildRepository = buildRepository;
 }
示例#11
0
        public BuildController(IBuildRepository buildRepo)
        {
            if (buildRepo == null)
            {
                throw new ArgumentNullException(nameof(buildRepo));
            }

            _buildRepo = buildRepo;
        }
        protected AbstractHistoryComponent(ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
        {
            _taskRepository = taskRepository;
            _sourceRepository = sourceRepository;
            _shelvesetRepository = shelvesetRepository;
            _buildRepository = buildRepository;

            this.GotFocus += AbstractHistoryComponent_GotFocus;
        }
示例#13
0
 public BuildsController(IAuthorizationService authService, IBuildRepository builds,
                         IEngineRepository engines, IEngineService engineService, IOptions <EngineOptions> engineOptions)
 {
     _authService   = authService;
     _builds        = builds;
     _engines       = engines;
     _engineService = engineService;
     _engineOptions = engineOptions;
 }
		public DeployStateManager(IDeployRepository deployRepository, IDeployStateRepository deployStateRepository, IBuildRepository buildRepository, IProjectRepository projectRepository, IDeploymentValidator deploymentValidator, IProjectNotifier projectNotifier, IDeployStatusNotifier deployStatusNotifier)
		{
			_deployRepository = DIHelper.VerifyParameter(deployRepository);
            _deployStateRepository = DIHelper.VerifyParameter(deployStateRepository);
			_buildRepository = DIHelper.VerifyParameter(buildRepository);
			_projectRepository = DIHelper.VerifyParameter(projectRepository);
			_validator = DIHelper.VerifyParameter(deploymentValidator);
			_projectNotifier = DIHelper.VerifyParameter(projectNotifier);
            _deployStatusNotifier = DIHelper.VerifyParameter(deployStatusNotifier);
		}
        public BranchBrowser(ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
            : base(taskRepository, sourceRepository, shelvesetRepository, buildRepository)
        {
            _revisionBrowser = new RevisionBrowser(_taskRepository, _sourceRepository, _shelvesetRepository, _buildRepository);
            _changeCommitter = new ChangeCommitter(_taskRepository, _sourceRepository, _shelvesetRepository, _buildRepository);

            InitializeComponent();
            branchGrid.Grid.MultiSelect = false;
            this.ExecuteLater(10, () => SwitchCurrentTab(true));
        }
示例#16
0
        public void SetData(object obj)
        {
            var baseObject = (buildType)obj;

            this.Id              = baseObject.id;
            this.Name            = baseObject.name;
            this.Description     = baseObject.description;
            this.BuildRepository = new BuildRepository(baseObject.builds.href + "?locator=count:1");
            this.BuildRepository.PropertyChanged += this.BuildRepositoryOnPropertyChanged;
        }
示例#17
0
        protected AbstractHistoryComponent
            (ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
        {
            _taskRepository      = taskRepository;
            _sourceRepository    = sourceRepository;
            _shelvesetRepository = shelvesetRepository;
            _buildRepository     = buildRepository;

            this.GotFocus += AbstractHistoryComponent_GotFocus;
        }
        public BuildFacade(IBuildRepository buildBuildRepository = null)
        {
            buildBuildRepository ??= new InMemoryBuildRepository();

            buildFactory = new BuildFactory(buildBuildRepository);

            buildFactory.BuildCreatedEvent += OnBuildCreated;
            buildMonitor.StageUpdateEvent  += OnStageComplete;
            buildMonitor.BuildUpdateEvent  += OnBuildComplete;
        }
示例#19
0
		public DeployRunner(IBuildRepository buildRepository, IProjectRepository projectRepository, IDeployTaskStatusManager statusManager, IDeployComponentRunner componentRunner, IDeployTaskFactory taskFactory, IFileManager fileManager, IZipper zipper)
		{
			_buildRepository = DIHelper.VerifyParameter(buildRepository);
			_projectRepository = DIHelper.VerifyParameter(projectRepository);
			_statusManager = DIHelper.VerifyParameter(statusManager);
			_componentRunner = DIHelper.VerifyParameter(componentRunner);
			_taskFactory = DIHelper.VerifyParameter(taskFactory);
			_fileManager = DIHelper.VerifyParameter(fileManager);
			_zipper = DIHelper.VerifyParameter(zipper);
		}
        public DeployRequestManager(IBuildRepository buildRepository, IProjectRepository projectRepository, IDeployRepository deployRepository, IDeploymentValidator validator, IProjectNotifier projectNotifier, IUserIdentity userIdentity, IDeployStateRepository deployStateRepository)
		{
			_buildRepository = DIHelper.VerifyParameter(buildRepository);
			_projectRepository = DIHelper.VerifyParameter(projectRepository);
			_deployRepository = DIHelper.VerifyParameter(deployRepository);
            _deployStateRepository = DIHelper.VerifyParameter(deployStateRepository);
			_validator = DIHelper.VerifyParameter(validator);
			_projectNotifier = DIHelper.VerifyParameter(projectNotifier);
			_userIdentity = DIHelper.VerifyParameter(userIdentity);
		}
示例#21
0
        public Monitor(IBuildFactory buildFactory, IBuildRepository buildRepository)
        {
            this.buildFactory    = buildFactory;
            this.buildRepository = buildRepository;

            runningProjects = new HashSet <IProjectBuild>(new ProjectBuildComparer());

            SolutionBuildFinished = d => { };
            ProjectBuildFinished  = b => { };
        }
示例#22
0
 public CreateReleaseTask(
     ILogger <CreateReleaseTask> logger,
     IReleaseDefinitionRepository releaseDefinitionRepository,
     IBuildRepository buildRepository,
     IReleaseRepository releaseRepository)
 {
     _logger = logger;
     _releaseDefinitionRepository = releaseDefinitionRepository;
     _buildRepository             = buildRepository;
     _releaseRepository           = releaseRepository;
 }
示例#23
0
        public ScriptsGenerator(IConfiguration configuration, IBuildRepository buildRepository)
        {
            Configuration   = configuration;
            BuildRepository = buildRepository;

            ScriptsPath = Configuration.GetSection("AppSettings")["WebPackFolder"];
            if (string.IsNullOrEmpty(ScriptsPath))
            {
                throw new ArgumentException("Не задан путь до директории  со скриптами.");
            }
        }
		public PreviewEmailController(IDeployRepository deployRepository, IDeployStateRepository deployStateRepository,  IBuildRepository buildRepository, IProjectRepository projectRepository, ISystemSettings systemSettings, IUrlGenerator urlGenerator, IRazorTemplateRepository razorTemplateRepository, INotificationResourceViews notificationResourceViews)
		{
			_deployRepository = DIHelper.VerifyParameter(deployRepository);
            _deployStateRepository = DIHelper.VerifyParameter(deployStateRepository);
			_buildRepository = DIHelper.VerifyParameter(buildRepository);
			_projectRepository = DIHelper.VerifyParameter(projectRepository);
			_systemSettings = DIHelper.VerifyParameter(systemSettings);
			_urlGenerator = DIHelper.VerifyParameter(urlGenerator);
			_razorTemplateRepository = DIHelper.VerifyParameter(razorTemplateRepository);
			_notificationResourceViews = DIHelper.VerifyParameter(notificationResourceViews);
		}
示例#25
0
 public EngineService(IOptions <EngineOptions> options, IEngineRepository engineRepo, IBuildRepository buildRepo,
                      IRepository <Project> projectRepo, Func <string, Owned <EngineRunner> > engineRunnerFactory)
 {
     _options             = options;
     _engineRepo          = engineRepo;
     _buildRepo           = buildRepo;
     _projectRepo         = projectRepo;
     _engineRunnerFactory = engineRunnerFactory;
     _runners             = new ConcurrentDictionary <string, Owned <EngineRunner> >();
     _lock        = new AsyncReaderWriterLock();
     _commitTimer = new AsyncTimer(EngineCommitAsync);
 }
        public ChangeCommitter(ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
            : base(taskRepository, sourceRepository, shelvesetRepository, buildRepository)
        {
            InitializeComponent();

            changeInspector.ActionsForChangesFunction = (branchId, changeIds) =>
                GetActionsForChanges(branchId, changeIds, _sourceRepository.GetActionsForPendingChanges);
            changeInspector.ChangesFunction = _sourceRepository.GetPendingChanges;
            changeInspector.ComputeDifferencesFunction = _sourceRepository.ComputePendingDifferences;
            changeInspector.MessageFunction = null;
            changeInspector.ChangeLog.KeyDown += ChangeLog_KeyDown;
        }
示例#27
0
        public TabbedMain()
        {
            InitializeComponent();
            _logRepository = new LogRepository(_statusMessages);
            mainPanel.ActiveContentChanged += mainPanel_ActiveContentChanged;
            mainPanel.ContentRemoved       += mainPanel_ContentRemoved;
            Load                += Main_Load;
            FormClosing         += Main_Closing;
            _statusThrottle      = new Throttler(this, 100, UpdateStatusBar);
            _statusCleaner.Tick += statusCleaner_Tick;
            var programDirectoryInfo = GetExecutableDirectory();
            var programFolder        = programDirectoryInfo.FullName;
            var repositoriesFolder   = programFolder.CombinePath("Repositories");

            if (Directory.Exists(repositoriesFolder))
            {
                var catalog   = new DirectoryCatalog(repositoriesFolder);
                var container = new CompositionContainer(catalog);
                _taskRepository      = TryGetExportedValueOrDefault <ITaskRepository>(container, this);
                _sourceRepository    = TryGetExportedValueOrDefault <ISourceRepository>(container, this);
                _shelvesetRepository = TryGetExportedValueOrDefault <IShelvesetRepository>(container, this);
                _buildRepository     = TryGetExportedValueOrDefault <IBuildRepository>(container, this);
            }
            #if DEBUG
            _taskRepository      = _taskRepository ?? new Core.Mock.TaskRepository();
            _sourceRepository    = _sourceRepository ?? new Core.Mock.SourceRepository();
            _shelvesetRepository = _shelvesetRepository ?? new Core.Mock.ShelvesetRepository();
            _buildRepository     = _buildRepository ?? new Core.Mock.BuildRepository();
            #endif

            if (_sourceRepository != null)
            {
                _sourceRepository.Log = this;
            }

            if (_taskRepository != null)
            {
                _taskRepository.Log = this;
            }

            if (_shelvesetRepository != null)
            {
                _shelvesetRepository.Log = this;
            }

            if (_buildRepository != null)
            {
                _buildRepository.Log = this;
            }

            RegisterComponents();
            mainPanel.DocumentStyle = DocumentStyle.DockingWindow;
        }
        public ShelvesetInspector(ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
            : base(taskRepository, sourceRepository, shelvesetRepository, buildRepository)
        {
            InitializeComponent();

            changeInspector.ChangeLog.IsReadOnly = true;
            changeInspector.ChangeLog.LongLines.EdgeMode = EdgeMode.None;
            changeInspector.ActionsForChangesFunction = (branchId, changeIds) =>
                GetActionsForChanges(branchId, changeIds, _shelvesetRepository.GetActionsForShelvesetChanges);
            changeInspector.ChangesFunction = _shelvesetRepository.GetShelvesetChanges;
            changeInspector.ComputeDifferencesFunction = _shelvesetRepository.ComputeShelvesetDifferences;
            changeInspector.MessageFunction = _shelvesetRepository.GetShelvesetMessage;
        }
示例#29
0
        public static async Task <Build> GetByLocatorAsync(this IBuildRepository buildRepo, BuildLocatorType locatorType,
                                                           string locator)
        {
            switch (locatorType)
            {
            case BuildLocatorType.Id:
                return(await buildRepo.GetAsync(locator));

            case BuildLocatorType.Engine:
                return(await buildRepo.GetByEngineIdAsync(locator));
            }
            return(null);
        }
示例#30
0
 public EngineService(IOptions <EngineOptions> engineOptions, IEngineRepository engines,
                      IBuildRepository builds, IProjectRepository projects,
                      Func <string, Owned <EngineRuntime> > engineRuntimeFactory)
 {
     _engineOptions       = engineOptions;
     _engines             = engines;
     _builds              = builds;
     _projects            = projects;
     _engineRunnerFactory = engineRuntimeFactory;
     _runtimes            = new ConcurrentDictionary <string, Owned <EngineRuntime> >();
     _lock        = new AsyncReaderWriterLock();
     _commitTimer = new AsyncTimer(EngineCommitAsync);
 }
示例#31
0
        public static Task <EntityChange <Build> > GetNewerRevisionAsync(this IBuildRepository repo,
                                                                         BuildLocatorType locatorType, string locator, long minRevision, CancellationToken ct)
        {
            switch (locatorType)
            {
            case BuildLocatorType.Id:
                return(repo.GetNewerRevisionAsync(locator, minRevision, ct));

            case BuildLocatorType.Engine:
                return(repo.GetNewerRevisionByEngineIdAsync(locator, minRevision, ct));
            }
            return(null);
        }
示例#32
0
        public static async Task <Build> GetByLocatorAsync(this IBuildRepository buildRepo, BuildLocatorType locatorType,
                                                           string locator, CancellationToken ct = default(CancellationToken))
        {
            switch (locatorType)
            {
            case BuildLocatorType.Id:
                return(await buildRepo.GetAsync(locator, ct));

            case BuildLocatorType.Engine:
                return(await buildRepo.GetByEngineIdAsync(locator, ct));
            }
            return(null);
        }
示例#33
0
 public PlayerTestRepository(IBuildRepository builds)
 {
     var player = new PlayerModel { Name = "Jupotter" };
     player.Build.Add(builds.GetById(0));
     player.Build.Add(builds.GetById(1));
     Add(player);
     player = new PlayerModel { Name = "Nilun" };
     player.Build.Add(builds.GetById(2));
     player.Build.Add(builds.GetById(3));
     player.Build.Add(builds.GetById(1));
     Add(player);
     player = new PlayerModel { Name = "Smurfi" };
     player.Build.Add(builds.GetById(4));
     Add(player);
 }
示例#34
0
 public ImportBuildServices(
     IBuildGateway buildGateway,
     IBuildRepository buildRepository,
     IScoreService scoreService,
     IMetricRepository metricRepository,
     IProjectRepository projectRepository,
     DateTime loadHistorySince)
 {
     this.buildGateway      = buildGateway;
     this.buildRepository   = buildRepository;
     this.scoreService      = scoreService;
     this.metricRepository  = metricRepository;
     this.projectRepository = projectRepository;
     this.loadHistorySince  = loadHistorySince;
 }
示例#35
0
        public BuildVM(IBuildRepository buildRepo, Logger.Logger logger)
        {
            if (buildRepo == null)
            {
                throw new ArgumentNullException(nameof(buildRepo));
            }
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            _buildRepo = buildRepo;
            _logger    = logger;
            Items      = new ObservableCollection <BuildResult>();

            try
            {
                _liveConfig              = new LiveConfig <List <BuildConfig> >("config.json");
                _liveConfig.Changed     += initializeItems;
                _liveConfig.Unavailable += () =>
                {
                    Items.Clear();
                    _currentIndex = 0;
                };
                _liveConfig.Watch();

                var timer = new Timer();
                timer.Interval = 1000;
                timer.Elapsed += change;
                timer.Start();

                var dateTimer = new Timer();
                dateTimer.Interval = 1000;
                dateTimer.Elapsed += (s, e) => CurrentTime = DateTime.Now;
                dateTimer.Start();
            }
            catch (Exception ex)
            {
                _logger.Log(LogLevel.Info, ex);
            }
        }
示例#36
0
 public BuildCommandHandler(IBuildRepository buildRepository)
 {
     _buildRepository = buildRepository;
 }
示例#37
0
 public BuildServices(IBuildRepository buildRepository)
 {
     this.buildRepository = buildRepository;
 }
        public RevisionBrowser
            (ITaskRepository taskRepository, ISourceRepository sourceRepository, IShelvesetRepository shelvesetRepository, IBuildRepository buildRepository)
            : base(taskRepository, sourceRepository, shelvesetRepository, buildRepository)
        {
            _revisionInspector = new RevisionInspector(taskRepository, sourceRepository, shelvesetRepository, buildRepository);

            InitializeComponent();
            activityRevisions.Grid.MultiSelect = false;
        }
示例#39
0
 public MemoryBuildRepository(IBuildRepository persistenceRepo = null)
     : base(persistenceRepo)
 {
     _engineIdIndex = new UniqueEntityIndex <string, Build>(Lock, b => b.EngineRef,
                                                            b => b.State == BuildStates.Active || b.State == BuildStates.Pending);
 }
 public ArgumentsController(IDocumentStore store, IBuildRepository buildRepository, ProcedureLoader procedureLoader)
 {
     this.store = store;
     this.buildRepository = buildRepository;
     this.procedureLoader = procedureLoader;
 }
 public DataAdjusterWithLogging(IBuildRepository repository, LogAction log) : base(repository)
 {
     OnFoundInvalidData = data => log("-- Found invalid json-data in file: {0}", data.Source);
     OnFixedInvalidData = () => log("-- Successfully converted invalid json data to valid");
     OnCouldNotConvertData = e => log("-- Could not convert json-data : {0}", e.Message);
 }
示例#42
0
 public ShowBuildTask(ILogger <ShowBuildTask> logger, IBuildRepository buildRepository)
 {
     _logger          = logger;
     _buildRepository = buildRepository;
 }
 public BuildServerSource(IBuildRepository repository, string path)
 {
     _repository = repository;
     _buildPath = path;
 }
示例#44
0
 public BuildController(IBuildRepository repository)
 {
     this.repository = repository;
 }
示例#45
0
 public BuildDomainService(
     IBuildRepository buildRepository
     )
 {
     _buildRepository = buildRepository;
 }
示例#46
0
 public Build(IBuildRepository repository)
 {
     this.repository = repository;
 }
 public ProcedureExecutor(ProcedureLoader procedureLoader, IBuildRepository buildRepository, IMessenger messenger)
 {
     this.procedureLoader = procedureLoader;
     this.buildRepository = buildRepository;
     this.messenger = messenger;
 }
 public BuildServerSource(IBuildRepository repository)
     : this(repository, ConfigurationManager.AppSettings["DefaultBuildPath"])
 {
 }
 public BuildServerSource(IBuildRepository repository)
     : this(repository, ConfigurationManager.AppSettings["DefaultBuildPath"])
 {
 }
 public BuildServerSource(IBuildRepository repository, string path)
 {
     _repository = repository;
     _buildPath  = path;
 }
示例#51
0
 public BuildQueries(IBuildRepository buildRepository)
 {
     _buildRepository = buildRepository;
 }
示例#52
0
 public DataAdjuster(IBuildRepository buildRepository)
 {
     this.buildRepository = buildRepository;
 }
示例#53
0
 public BuildController(IBuildRepository buildRepository, ITeamRepository teamRepository, ILogger logger)
 {
     _buildRepository = buildRepository;
     _teamRepository  = teamRepository;
     _logger          = logger;
 }
 public ProjectsController(IDocumentStore store, IBuildRepository buildRepository)
 {
     this.store = store;
     this.buildRepository = buildRepository;
 }