private void ValidateAssembly(IPersistentAssemblyInfo persistentAssemblyInfo) { if (!_validating) { _validating = true; var validatorResult = persistentAssemblyInfo.Validate(AssemblyPathProvider.Instance.GetPath(Application)); persistentAssemblyInfo.Errors = validatorResult.Message; ObjectSpace.CommitChanges(); _validating = false; if (!validatorResult.Valid) { var messageResult = Validator.RuleSet.NewRuleSetValidationMessageResult(ObjectSpace, "Validation error! check Compile Errors Tab.", View.CurrentObject); throw new ValidationException(messageResult); } } }
public Type Validate(IPersistentAssemblyInfo persistentAssemblyInfo) { var worldCreatorModuleBase = Application.Modules.OfType <WorldCreatorModuleBase>().Single(); return(persistentAssemblyInfo.Validate(worldCreatorModuleBase.GetPath())); }