コード例 #1
0
ファイル: Documenter.cs プロジェクト: bobinskim/sqldoctor
        public int OnExecute()
        {
            try
            {
                logger.LogDebug("Generating SQL schema documentation for files in '{0}' filtered by {1}", this.InputDir, this.Filter);
                IEnumerable <string> input_files = loader.LoadFiles(this.InputDir, this.Filter, true);

                SchemaInfo schema = this.parser.Parse(input_files, this);
                this.OutputDocs = this.generator.Generate(schema, this);
                writer.WriteOutput(this.OutputDocs, this);
                return(0);
            }
            catch (Exception ex)
            {
                if (this.Verbose)
                {
                    this.logger.LogError(ex, "Docs generation error");
                }
                else
                {
                    this.logger.LogError($"Docs generation error: {ex.Message}");
                }

                return(1);
            }
        }