コード例 #1
0
        public bool Validate()
        {
            SplashForm.UpdateProgress("Preflight check...");

            var validators = IoCContainer.Resolve <IEnumerable <IValidator> >();

            //var validators = CompositionProvider.Current.GetExportedValues<BaseValidator>();

            service.AddRange(validators);

            service.ValidatorSucceed += service_UpdateProgress;
            //service.ValidatorFailed += service_ValidatorFailed;
            //service.ValidatorSkippped += service_UpdateProgress;

            service.Run();

            if (service.Errors > 0)
            {
                HandleErrors();
                return(false);
            }


            return(true);
        }