public TypeScriptDocGenerator(IConfiguration configuration) { var files = configuration.GetSection("source").GetSection("files").Get <string[]>(); _aistantSettings = configuration.GetSection("aistant").Get <AistantSettings>(); var parser = new TypeDocJsonParser(files); _lib = parser.Parse(); _lib.RootPath = _aistantSettings.Section?.Uri; }
public CSharpDocGenerator(IConfiguration configuration, ILogger logger, string outputPath = null) { _outputPath = outputPath; _aistantSettings = configuration.GetSection("aistant").Get <AistantSettings>(); _srcPath = Path.GetFullPath(configuration.GetSection("source:path").Get <string>()); _fileRegexPattern = configuration.GetSection("source:filter:assembly").Get <string>(); _nameSpaceRegexPattern = configuration.GetSection("source:filter:namespace").Get <string>(); _logger = logger; }
private void ReadSettingsFromConfigFile() { var builder = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()); Console.WriteLine($"Reading config: {ConfigPath} ..."); try { builder.AddJsonFile(ConfigPath); var config = builder.Build(); _gitSettings = config.GetSection("git").Get <GitSettings>() ?? new GitSettings(); _aistantSettings = config.GetSection("aistant").Get <AistantSettings>() ?? new AistantSettings(); } catch (FileNotFoundException ex) { throw ex; } }
public CSharpDocGenerator(IConfiguration configuration, ILogger logger, string outputPath = null) { _outputPath = outputPath; _aistantSettings = configuration.GetSection("aistant").Get <AistantSettings>(); var srcPath = configuration.GetSection("source:path").Get <string>(); _srcPath = srcPath != null?Path.GetFullPath(srcPath) : null; var packagesPath = configuration.GetSection("source:packages").Get <string>(); _packagesPath = packagesPath != null?Path.GetFullPath(packagesPath) : null; if (_srcPath == null && _packagesPath == null) { throw new Exception("source.path or source.packages is required"); } _fileRegexPattern = configuration.GetSection("source:filter:assembly").Get <string>(); _nameSpaceRegexPattern = configuration.GetSection("source:filter:namespace").Get <string>(); _logger = logger; }
public AistantSaver(AistantSettings settings, ILogger logger) { _service = new AistantKbService(settings, logger); }
public AistantArticlePublisher(AistantSettings settings, ILogger logger) { _service = new AistantKbService(settings, logger); }