public SyncManager(ILibraryManager libraryManager, ISyncRepository repo, IImageProcessor imageProcessor, ILogger logger) { _libraryManager = libraryManager; _repo = repo; _imageProcessor = imageProcessor; _logger = logger; }
public SyncJobFacade( ILogger <SyncJobFacade> logger, ISyncLogRepository syncLogRepository, IOctopusRepository octopusRepository, ISpaceRepository spaceRepository, IProjectRepository projectRepository, IEnvironmentRepository environmentRepository, ITenantRepository tenantRepository, IReleaseRepository releaseRepository, IDeploymentRepository deploymentRepository, ISyncRepository syncRepository, ISyncLogModelFactory syncLogModelFactory) { _logger = logger; _syncLogRepository = syncLogRepository; _octopusRepository = octopusRepository; _spaceRepository = spaceRepository; _projectRepository = projectRepository; _environmentRepository = environmentRepository; _tenantRepository = tenantRepository; _releaseRepository = releaseRepository; _deploymentRepository = deploymentRepository; _syncRepository = syncRepository; _syncLogModelFactory = syncLogModelFactory; }
public PGRows(IConnectorsRepository connectorRepository, IPaginatedMetaService paginatedMetaService, ILogger <PGRows> logger, ISyncRepository syncRepository) { _connectorRepository = connectorRepository; _paginatedMetaService = paginatedMetaService; _logger = logger; _syncRepository = syncRepository; }
public SyncManager(ISyncRepository repository, IEnumerable <ISyncController> controllers, string path) { _repository = repository; _controllers = controllers; _path = path; }
public static ISyncRepository ResolveISyncRepository() { if (repository == null) { repository = new SyncRepository(); } return(repository); }
public SyncJobProcessor(ILibraryManager libraryManager, ISyncRepository syncRepo, ISyncManager syncManager, ILogger logger, IUserManager userManager) { _libraryManager = libraryManager; _syncRepo = syncRepo; _syncManager = syncManager; _logger = logger; _userManager = userManager; }
public ImageController(IHostingEnvironment environment, IMasterRepository masterRepo, IUnitOfWork unitOfWork, IConfiguration config, ISyncRepository syncRepository) { _masterRepository = masterRepo; _hostingEnvironment = environment; _unitOfWork = unitOfWork; _syncRepository = syncRepository; _config = config; }
public SyncScheduledTask(ILibraryManager libraryManager, ISyncRepository syncRepo, ISyncManager syncManager, ILogger logger, IUserManager userManager) { _libraryManager = libraryManager; _syncRepo = syncRepo; _syncManager = syncManager; _logger = logger; _userManager = userManager; }
public SyncJobHostedService(ILogger <SyncJobHostedService> logger, ISyncRepository syncRepository, ISyncJobCompositeModelFactory syncJobCompositeModelFactory, ISyncJobFacade syncJobFacade) { _logger = logger; _syncRepository = syncRepository; _syncJobCompositeModelFactory = syncJobCompositeModelFactory; _syncJobFacade = syncJobFacade; }
public SyncJobProcessor(ILibraryManager libraryManager, ISyncRepository syncRepo, ISyncManager syncManager, ILogger logger, IUserManager userManager, ITVSeriesManager tvSeriesManager, IMediaEncoder mediaEncoder) { _libraryManager = libraryManager; _syncRepo = syncRepo; _syncManager = syncManager; _logger = logger; _userManager = userManager; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; }
public async Task <DraftEntryPoint> Begin([FromServices] ISyncRepository syncRepo) { var syncInfo = await syncRepo.SyncInfo(); return(new DraftEntryPoint() { HasUncommittedChanges = syncInfo.HasUncomittedChanges, HasUnsyncedChanges = syncInfo.NeedsPull || syncInfo.NeedsPush }); }
public HomeController(ILogger <HomeController> logger, IInstanceRepository instanceRepository, ISyncModelFactory syncModelFactory, ISyncRepository syncRepository) { _logger = logger; _instanceRepository = instanceRepository; _syncModelFactory = syncModelFactory; _syncRepository = syncRepository; }
public SyncManager(ILibraryManager libraryManager, ISyncRepository repo, IImageProcessor imageProcessor, ILogger logger, IUserManager userManager, Func <IDtoService> dtoService, IApplicationHost appHost, ITVSeriesManager tvSeriesManager, Func <IMediaEncoder> mediaEncoder) { _libraryManager = libraryManager; _repo = repo; _imageProcessor = imageProcessor; _logger = logger; _userManager = userManager; _dtoService = dtoService; _appHost = appHost; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; }
public SyncScheduledTask(ILibraryManager libraryManager, ISyncRepository syncRepo, ISyncManager syncManager, ILogger logger, IUserManager userManager, ITVSeriesManager tvSeriesManager, IMediaEncoder mediaEncoder, ISubtitleEncoder subtitleEncoder, IConfigurationManager config, IFileSystem fileSystem) { _libraryManager = libraryManager; _syncRepo = syncRepo; _syncManager = syncManager; _logger = logger; _userManager = userManager; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; _subtitleEncoder = subtitleEncoder; _config = config; _fileSystem = fileSystem; }
public SyncJobProcessor(ILibraryManager libraryManager, ISyncRepository syncRepo, SyncManager syncManager, ILogger logger, IUserManager userManager, ITVSeriesManager tvSeriesManager, IMediaEncoder mediaEncoder, ISubtitleEncoder subtitleEncoder, IConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager) { _libraryManager = libraryManager; _syncRepo = syncRepo; _syncManager = syncManager; _logger = logger; _userManager = userManager; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; _subtitleEncoder = subtitleEncoder; _config = config; _fileSystem = fileSystem; _mediaSourceManager = mediaSourceManager; }
public SyncConvertScheduledTask(ILibraryManager libraryManager, ISyncRepository syncRepo, ISyncManager syncManager, ILogger logger, IUserManager userManager, ITVSeriesManager tvSeriesManager, IMediaEncoder mediaEncoder, ISubtitleEncoder subtitleEncoder, IConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager) { _libraryManager = libraryManager; _syncRepo = syncRepo; _syncManager = syncManager; _logger = logger; _userManager = userManager; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; _subtitleEncoder = subtitleEncoder; _config = config; _fileSystem = fileSystem; _mediaSourceManager = mediaSourceManager; }
public SyncManager(ILibraryManager libraryManager, ISyncRepository repo, IImageProcessor imageProcessor, ILogger logger, IUserManager userManager, Func <IDtoService> dtoService, IApplicationHost appHost, ITVSeriesManager tvSeriesManager, Func <IMediaEncoder> mediaEncoder, IFileSystem fileSystem, Func <ISubtitleEncoder> subtitleEncoder, IConfigurationManager config, IUserDataManager userDataManager) { _libraryManager = libraryManager; _repo = repo; _imageProcessor = imageProcessor; _logger = logger; _userManager = userManager; _dtoService = dtoService; _appHost = appHost; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; _fileSystem = fileSystem; _subtitleEncoder = subtitleEncoder; _config = config; _userDataManager = userDataManager; }
/// <summary> /// Get the current status of the compiler. /// </summary> /// <returns></returns> public async Task <PublishEntryPoint> GetPublishInfo(ISyncRepository syncRepo) { var publishRepoPath = projectFinder.PublishedProjectPath; var masterRepoPath = projectFinder.MasterRepoPath; var compilerStatus = new PublishEntryPoint() { BehindBy = -1, BehindHistory = null }; if (publishRepoPath != masterRepoPath) { using (var repo = new Repository(publishRepoPath)) { var startInfo = new ProcessStartInfo("git") { ArgumentList = { "fetch", "--all" }, WorkingDirectory = repo.Info.WorkingDirectory }; processRunner.Run(startInfo); var head = repo.Head.Commits.First(); var tracked = repo.Head.TrackedBranch.Commits.First(); var divergence = repo.ObjectDatabase.CalculateHistoryDivergence(head, tracked); var behindCommits = repo.Commits.QueryBy(new CommitFilter() { SortBy = CommitSortStrategies.Reverse | CommitSortStrategies.Time, IncludeReachableFrom = divergence.Another, ExcludeReachableFrom = divergence.CommonAncestor }); compilerStatus.BehindBy = divergence.BehindBy.GetValueOrDefault(); compilerStatus.BehindHistory = behindCommits.Select(c => new History(c)).ToList(); var syncInfo = await syncRepo.SyncInfo(); compilerStatus.HasUncommittedChanges = syncInfo.HasUncomittedChanges; compilerStatus.HasUnsyncedChanges = syncInfo.NeedsPull || syncInfo.NeedsPush; } } return(compilerStatus); }
public SyncManager(ILibraryManager libraryManager, ISyncRepository repo, IImageProcessor imageProcessor, ILogger logger, IUserManager userManager, Func<IDtoService> dtoService, IServerApplicationHost appHost, ITVSeriesManager tvSeriesManager, Func<IMediaEncoder> mediaEncoder, IFileSystem fileSystem, Func<ISubtitleEncoder> subtitleEncoder, IConfigurationManager config, IUserDataManager userDataManager, Func<IMediaSourceManager> mediaSourceManager, IJsonSerializer json, ITaskManager taskManager) { _libraryManager = libraryManager; _repo = repo; _imageProcessor = imageProcessor; _logger = logger; _userManager = userManager; _dtoService = dtoService; _appHost = appHost; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; _fileSystem = fileSystem; _subtitleEncoder = subtitleEncoder; _config = config; _userDataManager = userDataManager; _mediaSourceManager = mediaSourceManager; _json = json; _taskManager = taskManager; }
public SyncManager(ILibraryManager libraryManager, ISyncRepository repo, IImageProcessor imageProcessor, ILogger logger, IUserManager userManager, Func <IDtoService> dtoService, IServerApplicationHost appHost, ITVSeriesManager tvSeriesManager, Func <IMediaEncoder> mediaEncoder, IFileSystem fileSystem, Func <ISubtitleEncoder> subtitleEncoder, IConfigurationManager config, IUserDataManager userDataManager, Func <IMediaSourceManager> mediaSourceManager, IJsonSerializer json, ITaskManager taskManager, IMemoryStreamFactory memoryStreamProvider) { _libraryManager = libraryManager; _repo = repo; _imageProcessor = imageProcessor; _logger = logger; _userManager = userManager; _dtoService = dtoService; _appHost = appHost; _tvSeriesManager = tvSeriesManager; _mediaEncoder = mediaEncoder; _fileSystem = fileSystem; _subtitleEncoder = subtitleEncoder; _config = config; _userDataManager = userDataManager; _mediaSourceManager = mediaSourceManager; _json = json; _taskManager = taskManager; _memoryStreamProvider = memoryStreamProvider; }
public SyncService(ISyncRepository syncRepository, ILogWriter logWriter) { _syncRepository = syncRepository; _logWriter = logWriter; }
protected override void ResetRepositories() { _products = null; _categories = null; }
public SyncController(ILogger <HomeController> logger, ISyncRepository syncRepository) { _logger = logger; _syncRepository = syncRepository; }
public MainController(IWindow view, IMainFactory factory) { if (view == null) { throw new ArgumentNullException(typeof(IWindow).ToString()); } this.view = view; this.Dispatcher = view.Window.Dispatcher; if (factory == null) { throw new ArgumentNullException(typeof(IMainFactory).ToString()); } this.repository = factory.CreateISyncRepository(); if (this.repository == null) { throw new ApplicationInitializationException(typeof(ISyncRepository).ToString()); } this.MainViewModel = factory.CreateIMainViewModel(this); if (this.MainViewModel == null) { throw new ApplicationInitializationException(typeof(IMainViewModel).ToString()); } this.deviceManager = factory.CreateIDeviceManager(); if (this.deviceManager == null) { throw new ApplicationInitializationException(typeof(IDeviceManager).ToString()); } this.deviceEnumerationListener = factory.CreateIDeviceEnumerationListener(); if (this.deviceEnumerationListener == null) { throw new ApplicationInitializationException(typeof(IDeviceEnumerationListener).ToString()); } this.errorLogger = factory.CreateIErrorLogger(); if (this.errorLogger == null) { throw new ApplicationInitializationException(typeof(IErrorLogger).ToString()); } this.sqmHelper = factory.CreateISqmHelper(); if (this.sqmHelper == null) { throw new ApplicationInitializationException(typeof(ISqmHelper).ToString()); } this.preloader = factory.CreateISyncSourcePreloader(); if (this.preloader == null) { throw new ApplicationInitializationException(typeof(ISyncSourcePreloader).ToString()); } bool flag = ((string) GlobalSetting.GetApplicationSetting("MusicSyncSource")) == "ITunes"; bool flag2 = ((string) GlobalSetting.GetApplicationSetting("MusicSyncSource")) == "WindowsLibraries"; if (!flag && !flag2) { GlobalSetting.SetApplicationSetting("MusicSyncSource", "WindowsLibraries"); } bool flag3 = ITunesMusicSyncSource.IsITunesInstalled(); if (flag && !flag3) { if (!((bool) GlobalSetting.GetApplicationSetting("FirstRun"))) { MessageBox.Show(Resources.iTunesMissingWillSwitchMessage, Resources.iTunesMissingWillSwitchTitle, MessageBoxButton.OK, MessageBoxImage.Exclamation); } GlobalSetting.SetApplicationSetting("MusicSyncSource", "WindowsLibraries"); //this.MainViewModel.AppSettingsViewModel.Init(); } this.deviceEnumerationListener.EventArrived += new EventArrivedEventHandler(this.OnConnectedDevicesChanged); GlobalSetting.SettingChange = (EventHandler<ApplicationSettingsChangeEventArgs>) Delegate.Combine(GlobalSetting.SettingChange, new EventHandler<ApplicationSettingsChangeEventArgs>(this.OnApplicationSettingChanged)); }
public TodoListController(IUnitOfWork unitOfWork, ISyncRepository <Entities.Shared.TodoList> repository) : base(unitOfWork, repository) { }
public MainController(IWindow view, IMainFactory factory) { if (view == null) { throw new ArgumentNullException(typeof(IWindow).ToString()); } this.view = view; this.Dispatcher = view.Window.Dispatcher; if (factory == null) { throw new ArgumentNullException(typeof(IMainFactory).ToString()); } this.repository = factory.CreateISyncRepository(); if (this.repository == null) { throw new ApplicationInitializationException(typeof(ISyncRepository).ToString()); } this.MainViewModel = factory.CreateIMainViewModel(this); if (this.MainViewModel == null) { throw new ApplicationInitializationException(typeof(IMainViewModel).ToString()); } this.deviceManager = factory.CreateIDeviceManager(); if (this.deviceManager == null) { throw new ApplicationInitializationException(typeof(IDeviceManager).ToString()); } this.deviceEnumerationListener = factory.CreateIDeviceEnumerationListener(); if (this.deviceEnumerationListener == null) { throw new ApplicationInitializationException(typeof(IDeviceEnumerationListener).ToString()); } this.errorLogger = factory.CreateIErrorLogger(); if (this.errorLogger == null) { throw new ApplicationInitializationException(typeof(IErrorLogger).ToString()); } this.sqmHelper = factory.CreateISqmHelper(); if (this.sqmHelper == null) { throw new ApplicationInitializationException(typeof(ISqmHelper).ToString()); } this.preloader = factory.CreateISyncSourcePreloader(); if (this.preloader == null) { throw new ApplicationInitializationException(typeof(ISyncSourcePreloader).ToString()); } bool flag = ((string)GlobalSetting.GetApplicationSetting("MusicSyncSource")) == "ITunes"; bool flag2 = ((string)GlobalSetting.GetApplicationSetting("MusicSyncSource")) == "WindowsLibraries"; if (!flag && !flag2) { GlobalSetting.SetApplicationSetting("MusicSyncSource", "WindowsLibraries"); } bool flag3 = ITunesMusicSyncSource.IsITunesInstalled(); if (flag && !flag3) { if (!((bool)GlobalSetting.GetApplicationSetting("FirstRun"))) { MessageBox.Show(Resources.iTunesMissingWillSwitchMessage, Resources.iTunesMissingWillSwitchTitle, MessageBoxButton.OK, MessageBoxImage.Exclamation); } GlobalSetting.SetApplicationSetting("MusicSyncSource", "WindowsLibraries"); this.MainViewModel.AppSettingsViewModel.Init(); } this.deviceEnumerationListener.EventArrived += new EventArrivedEventHandler(this.OnConnectedDevicesChanged); GlobalSetting.SettingChange = (EventHandler <ApplicationSettingsChangeEventArgs>)Delegate.Combine(GlobalSetting.SettingChange, new EventHandler <ApplicationSettingsChangeEventArgs>(this.OnApplicationSettingChanged)); }
public SyncController(IUnitOfWork unitOfWork, ISyncRepository <T> repository) { this.unitOfWork = unitOfWork; this.repository = repository; }
public static ISyncRepository ResolveISyncRepository() { if (repository == null) { repository = new SyncRepository(); } return repository; }
/// <summary> /// Ctor /// </summary> /// <param name="service"></param> /// <param name="logger"></param> /// <param name="taskQueue"></param> public SyncController(ISyncRepository service, ILogger <SyncController> logger, IBackgroundTaskQueue taskQueue) { _repository = service ?? throw new ArgumentNullException(nameof(service)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _taskQueue = taskQueue ?? throw new ArgumentNullException(nameof(taskQueue)); }
public SyncController(ISyncRepository syncRepo) { this.syncRepo = syncRepo; }
public Task <PublishEntryPoint> Get([FromServices] ISyncRepository syncRepo) { return(publishRepo.GetPublishInfo(syncRepo)); }