Skip to content

Commit b4c9046

Browse files
committed
Заготовки по новому документеру
1 parent 334fb8e commit b4c9046

14 files changed

+1843
-1557
lines changed

src/OneScriptDocumenter/AssemblyDocumenter.cs

Lines changed: 904 additions & 904 deletions
Large diffs are not rendered by default.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*----------------------------------------------------------
2+
This Source Code Form is subject to the terms of the
3+
Mozilla Public License, v.2.0. If a copy of the MPL
4+
was not distributed with this file, You can obtain one
5+
at http://mozilla.org/MPL/2.0/.
6+
----------------------------------------------------------*/
7+
8+
using System.Collections.Generic;
9+
using CommandLine;
10+
11+
namespace OneScriptDocumenter.Cli
12+
{
13+
public class GeneratorOptions
14+
{
15+
[Value(0, Min = 1, HelpText = "Список dll файлов по которым создается документация")]
16+
public IEnumerable<string> AssemblyFiles { get; set; }
17+
18+
[Option('j', "json", HelpText = "Генерировать документацию в виде json-файла")]
19+
public string JsonFile { get; set; }
20+
21+
[Option('m', "markdown", HelpText = "Выходной каталог документации в виде набора md-файлов")]
22+
public string MarkdownDir { get; set; }
23+
24+
[Option('t', "toc", HelpText = "Файл оглавления")]
25+
public string TocFile { get; set; }
26+
}
27+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*----------------------------------------------------------
2+
This Source Code Form is subject to the terms of the
3+
Mozilla Public License, v.2.0. If a copy of the MPL
4+
was not distributed with this file, You can obtain one
5+
at http://mozilla.org/MPL/2.0/.
6+
----------------------------------------------------------*/
7+
8+
using OneScriptDocumenter.Primary;
9+
10+
namespace OneScriptDocumenter.Cli
11+
{
12+
public class JsonGenerator
13+
{
14+
}
15+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*----------------------------------------------------------
2+
This Source Code Form is subject to the terms of the
3+
Mozilla Public License, v.2.0. If a copy of the MPL
4+
was not distributed with this file, You can obtain one
5+
at http://mozilla.org/MPL/2.0/.
6+
----------------------------------------------------------*/
7+
8+
using System;
9+
10+
namespace OneScriptDocumenter
11+
{
12+
public static class ConsoleLogger
13+
{
14+
public static void Info(string content)
15+
{
16+
Console.WriteLine(content);
17+
}
18+
19+
public static void Warning(string content)
20+
{
21+
using var yellow = new ColorContext(ConsoleColor.Yellow);
22+
Console.Error.WriteLine(content);
23+
}
24+
25+
public static void Error(string content)
26+
{
27+
using var yellow = new ColorContext(ConsoleColor.Red);
28+
Console.Error.WriteLine(content);
29+
}
30+
31+
private class ColorContext : IDisposable
32+
{
33+
private readonly ConsoleColor _oldColor;
34+
35+
public ColorContext(ConsoleColor newColor)
36+
{
37+
_oldColor = Console.ForegroundColor;
38+
Console.ForegroundColor = newColor;
39+
}
40+
41+
public void Dispose()
42+
{
43+
Console.ForegroundColor = _oldColor;
44+
}
45+
}
46+
}
47+
}

0 commit comments

Comments
 (0)