Exemplo n.º 1
0
        public Task <bool> Fix(IServiceRecommendation recommendation)
        {
            switch (recommendation.Type)
            {
            case ServiceRecommendationType.Service:
                return(this.ChangeStatus(recommendation.ServiceName, recommendation.ExpectedToRun));

            case ServiceRecommendationType.OneTime:
                return(this.KillProcesses(recommendation.ServiceName));

            case ServiceRecommendationType.WindowsDefender:
                return(this.DefenderSettings());

            default:
                throw new NotSupportedException();
            }
        }
Exemplo n.º 2
0
 public ServiceRecommendationViewModel(
     RepackagingRecommendationViewModel parent,
     IServiceRecommendationAdvisor advisor,
     IServiceRecommendation model,
     IInteractionService interactionService)
 {
     this.parent             = parent;
     this.advisor            = advisor;
     this.model              = model;
     this.interactionService = interactionService;
     this.DisplayName        = model.DisplayName;
     this.ServiceName        = model.ServiceName;
     this.IsRunning          = model.Actual;
     this.ShouldRun          = model.ExpectedToRun;
     this.Recommendation     = model.ActionPrompt;
     this.Type = model.Type;
 }
Exemplo n.º 3
0
 public Task <bool> Revert(IServiceRecommendation recommendation)
 {
     return(this.ChangeStatus(recommendation.ServiceName, !recommendation.ExpectedToRun));
 }