public MetadataFile(string fullName, ABIFileSystemOptions options) { _options = options; FullName = fullName; Result = new CompilerEngineResult(); }
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); }
public CompilerEngine(ABIFileSystemOptions options, LogFactory factory) { _logger = factory.GetCurrentClassLogger(); _options = options; }