public CleanupViewModel(IUnityContainer unityContainer, IApplicationCommands applicationCommands, ICleanupService cleanupService) { this.applicationCommands = applicationCommands; this.unityContainer = unityContainer; this.cleanupService = cleanupService; this.JunkCollection = new ObservableCollection <JunkItemViewModel>(); this.SaveCommand = new DelegateCommand(this.Save); this.applicationCommands.SaveCommand.RegisterCommand(this.SaveCommand); this.ScanCommand = new DelegateCommand(this.ExecuteScan, this.CanScan).ObservesProperty(() => this.IsBusy); this.DeleteCommand = new DelegateCommand(this.ExecuteDelete, this.CanDelete).ObservesProperty(() => this.IsBusy); }
public CleanupCommand(IUserInterface userInterface, ICleanupService cleanupService) { if (userInterface == null) { throw new ArgumentNullException("userInterface"); } if (cleanupService == null) { throw new ArgumentNullException("cleanupService"); } this.userInterface = userInterface; this.cleanupService = cleanupService; this.Attributes = new CommandAttributes { CommandName = CommandName, AlternativeCommandNames = this.alternativeCommandNames, RequiredArguments = new string[] { }, PositionalArguments = new[] { ArgumentNameNugetPackageId }, Description = Resources.CleanupCommand.CommandDescriptionText, Usage = string.Format("{0} <{1}>", CommandName, ArgumentNameNugetPackageId), Examples = new Dictionary<string, string> { { string.Format("{0}", CommandName), Resources.CleanupCommand.CommandExampleDescription1 }, { string.Format("{0} <{1}>", CommandName, ArgumentNameNugetPackageId), Resources.CleanupCommand.CommandExampleDescription2 } }, ArgumentDescriptions = new Dictionary<string, string> { { ArgumentNameNugetPackageId, Resources.CleanupCommand.ArgumentDescriptionNugetPackageId } } }; this.Arguments = new Dictionary<string, string>(); }
public ApplicationService( CommandContext context, ILog log, IMediator mediator, ISourceLocationService sourceLocationService, ICleanupPathsService cleanupPathsService, ICleanupService cleanupService, IPostCleanupService postCleanupService) { _context = context ?? throw new ArgumentNullException(nameof(context)); _log = log ?? throw new ArgumentNullException(nameof(log)); _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); _sourceLocationService = sourceLocationService ?? throw new ArgumentNullException(nameof(sourceLocationService)); _cleanupPathsService = cleanupPathsService ?? throw new ArgumentNullException(nameof(cleanupPathsService)); _cleanupService = cleanupService ?? throw new ArgumentNullException(nameof(cleanupService)); _postCleanupService = postCleanupService ?? throw new ArgumentNullException(nameof(postCleanupService)); }
public TaskScheduler(ICacheService cacheService, ILogger <TaskScheduler> logger, IScannerService scannerService, IUnitOfWork unitOfWork, IMetadataService metadataService, IBackupService backupService, ICleanupService cleanupService, IWebHostEnvironment env) { _cacheService = cacheService; _logger = logger; _scannerService = scannerService; _unitOfWork = unitOfWork; _metadataService = metadataService; _backupService = backupService; _cleanupService = cleanupService; if (!env.IsDevelopment()) { ScheduleTasks(); } else { RecurringJob.RemoveIfExists("scan-libraries"); RecurringJob.RemoveIfExists("backup"); RecurringJob.RemoveIfExists("cleanup"); } }
public ProjectManager(IConsole console, ICleanupService cleanupService, IProjectFilter projectFilter) { _console = console; _cleanupService = cleanupService; _projectFilter = projectFilter; }
public SchduleTaskService(ILogger <string> logger, ICleanupService cleanup) { _logger = logger; _cleanup = cleanup; }