Ejemplo n.º 1
0
        private ValidatorResult GetValidatorResult(string errors, string assemblyName)
        {
            var validatorResult = new ValidatorResult()
            {
                Message = errors
            };

            if (validatorResult.Valid)
            {
                var assemblyPath = Path.Combine(_compiler.AssemblyPath,
                                                assemblyName + CodeProvider.Compiler.XpandExtension);
                validatorResult = _assemblyValidator.Validate(assemblyPath);
            }
            return(validatorResult);
        }
Ejemplo n.º 2
0
        private ValidatorResult ValidateCore(string assemblyPath)
        {
            var validatorResult = new ValidatorResult();

            try{
                using (var typesInfo = new TypesInfo()){
                    typesInfo.AddEntityStore(new XpoTypeInfoSource(typesInfo));
                    TypesInfoValidation(assemblyPath, typesInfo);
                    DataStoreValidation(typesInfo);
                }
            }
            catch (Exception e) {
                var exception = e;
                if (exception.InnerException != null)
                {
                    exception = e.InnerException;
                }
                validatorResult.Message = Tracing.Tracer.FormatExceptionReport(exception);
            }
            return(validatorResult);
        }