public override void OnCompositionComplete() { base.OnCompositionComplete(); ShowConsoleCommand = CommandFactory.Create(ShowConsole, () => true); ClearCommand = CommandFactory.Create(Clear, () => true); SaveCommand = CommandFactory.Create(Save, () => true); PrepareCommand = CommandFactory.Create(ManagePreparation, () => true); SelectInputFileCommand = CommandFactory.Create(LoadInputFile, () => Prepared.IsValidSQLInstance); LoadInputSourcesCommand = CommandFactory.Create(LoadInputSources, () => true); ExportToFileCommand = CommandFactory.Create <int>(ExportToFile, () => true); SelectProvidersCommand = CommandFactory.Create(SelectProviders, () => Prepared.IsValid()); ApplyProvidersFilterCommand = CommandFactory.Create(ApplyFilter, () => true); SelectRulesCommand = CommandFactory.Create(SelectRules, () => Prepared.IsValid() && Providers.IsValid()); RunCommand = CommandFactory.Create(Run, OKToRun); }
/// <summary> /// Ok to run. /// </summary> /// <returns></returns> private bool OKToRun() { return(Prepared.IsValid() && Providers.IsValid() && RuleSet.IsValid()); }