Ejemplo n.º 1
0
        public MetadataFile(string fullName, ABIFileSystemOptions options)
        {
            _options = options;

            FullName = fullName;
            Result = new CompilerEngineResult();
        }
Ejemplo n.º 2
0
        public MetadataFile(string fullName, ABIFileSystemOptions options)
        {
            _options = options;

            FullName = fullName;
            Result   = new CompilerEngineResult();
        }
Ejemplo n.º 3
0
        private static int Compile(CompileOptions compileOptions)
        {
            var metadataSearchSubDirectories = Convert.ToBoolean(ConfigurationManager.AppSettings["MetadataSearchSubDirectories"] ?? bool.TrueString);

            var metadataSearchPattern = compileOptions.MetadataSearchPattern ?? ConfigurationManager.AppSettings["MetadataSearchPattern"] ?? "*.json";

            if (metadataSearchPattern.EndsWith("*"))
            {
                metadataSearchPattern += ABIFileSystemOptions.StandardMetadataFileExtension;
            }

            var fileSystemRootPath = ConfigurationManager.AppSettings["FileSystemRootPath"] ?? @".";
            var metadataFolderName = ConfigurationManager.AppSettings["MetadataFolderName"] ?? @"metadata";
            var templateFolderName = ConfigurationManager.AppSettings["TemplateFolderName"] ?? @"templates";
            var outputFolderName   = ConfigurationManager.AppSettings["OutputFolderName"] ?? @"output";

            var options = new ABIFileSystemOptions(
                rootPath: fileSystemRootPath,
                metadataFolder: metadataFolderName,
                templateFolder: templateFolderName,
                outputFolder: outputFolderName,
                metadataSearchPattern: metadataSearchPattern,
                metadataSearchSubDirectories: metadataSearchSubDirectories
                );

            var result = ABIFileSystemCompiler.Compile(options, _logger.Factory);

            if (result != ABIExitCode.CompileCompleted)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(result);
                Console.ResetColor();
            }

            return((int)result);
        }
Ejemplo n.º 4
0
 public CompilerEngine(ABIFileSystemOptions options, LogFactory factory)
 {
     _logger = factory.GetCurrentClassLogger();
     _options = options;
 }
Ejemplo n.º 5
0
 public CompilerEngine(ABIFileSystemOptions options, LogFactory factory)
 {
     _logger  = factory.GetCurrentClassLogger();
     _options = options;
 }