Как работает System.CommandLine?
От: Эйнсток Файр Мухосранск Странный реагент
Дата: 31.08.19 16:48
Оценка:
Сколько строк текста документации нужно для того, чтобы в деталях описать словами что, как и почему реализовано в библиотеке?
Т.е. чтобы объяснить каждое принятое архитектурное решение?

~/System.CommandLine $ find . -type f -exec cat {} \; | wc -l
14088
  Скрытый текст
$ find . -type f -exec wc -l {} \;
165 ./System.CommandLine/Symbol.cs
15 ./System.CommandLine/IArgument.cs
16 ./System.CommandLine/ResponseFileHandling.cs
81 ./System.CommandLine/CommandResultExtensions.cs
41 ./System.CommandLine/TestConsole.cs
15 ./System.CommandLine/SymbolCannotContainDelimiterArgumentException.SymbolCannotContainDelimiterException.cs
26 ./System.CommandLine/DictionaryExtensions.cs
68 ./System.CommandLine/ValidationMessages.cs
12 ./System.CommandLine/TooManyArgumentsConversionResult.cs
9 ./System.CommandLine/ConvertArgument.cs
44 ./System.CommandLine/ConsoleExtensions.cs
39 ./System.CommandLine/Token.cs
33 ./System.CommandLine/Parser.cs
12 ./System.CommandLine/FailedArgumentConversionArityResult.cs
12 ./System.CommandLine/ISymbolSet.cs
12 ./System.CommandLine/IOption.cs
37 ./System.CommandLine/CommandExtensions.cs
104 ./System.CommandLine/Invocation/Process.cs
15 ./System.CommandLine/Invocation/HelpResult.cs
160 ./System.CommandLine/Invocation/CommandHandler.cs
12 ./System.CommandLine/Invocation/ICommandHandler.cs
11 ./System.CommandLine/Invocation/InvocationMiddleware.cs
75 ./System.CommandLine/Invocation/InvocationPipeline.cs
46 ./System.CommandLine/Invocation/ServiceProvider.cs
19 ./System.CommandLine/Invocation/ParseDirectiveResult.cs
10 ./System.CommandLine/Invocation/IInvocationResult.cs
48 ./System.CommandLine/Invocation/FeatureRegistration.cs
73 ./System.CommandLine/Invocation/InvocationContext.cs
74 ./System.CommandLine/Invocation/ModelBindingCommandHandler.cs
31 ./System.CommandLine/Invocation/SuggestDirectiveResult.cs
29 ./System.CommandLine/Invocation/ParseErrorResult.cs
144 ./System.CommandLine/Invocation/TypoCorrection.cs
436 ./System.CommandLine/Invocation/InvocationExtensions.cs
49 ./System.CommandLine/RootCommand.cs
59 ./System.CommandLine/DirectiveCollection.cs
54 ./System.CommandLine/SymbolSet.cs
12 ./System.CommandLine/Parsing/TextSpan.cs
14 ./System.CommandLine/Parsing/RootCommandNode.cs
23 ./System.CommandLine/Parsing/CommandNode.cs
18 ./System.CommandLine/Parsing/EndOfArgumentsNode.cs
128 ./System.CommandLine/Parsing/CommandLineStringSplitter.cs
15 ./System.CommandLine/Parsing/ImplicitToken.cs
361 ./System.CommandLine/Parsing/ParseResultVisitor.cs
26 ./System.CommandLine/Parsing/OptionArgumentNode.cs
27 ./System.CommandLine/Parsing/DirectiveNode.cs
22 ./System.CommandLine/Parsing/SyntaxNode.cs
109 ./System.CommandLine/Parsing/SyntaxVisitor.cs
14 ./System.CommandLine/Parsing/UnparsedTokenNode.cs
12 ./System.CommandLine/Parsing/ICommandLineStringSplitter.cs
23 ./System.CommandLine/Parsing/OptionNode.cs
20 ./System.CommandLine/Parsing/NonterminalSyntaxNode.cs
287 ./System.CommandLine/Parsing/ParseOperation.cs
14 ./System.CommandLine/Parsing/UnmatchedTokenNode.cs
26 ./System.CommandLine/Parsing/CommandArgumentNode.cs
39 ./System.CommandLine/Parsing/CommandLineParser.cs
23 ./System.CommandLine/ArgumentConversionResult.cs
26 ./System.CommandLine/System.CommandLine.csproj
22 ./System.CommandLine/TokenizeResult.cs
16 ./System.CommandLine/Suggestions.cs
15 ./System.CommandLine/TokenType.cs
14 ./System.CommandLine/IDirectiveCollection.cs
285 ./System.CommandLine/ParseResultExtensions.cs
78 ./System.CommandLine/RootCommandResult.cs
22 ./System.CommandLine/AnonymousSuggestionSource.cs
9 ./System.CommandLine/Suggest.cs
291 ./System.CommandLine/ArgumentConverter.cs
7 ./System.CommandLine/ValidateSymbol.cs
12 ./System.CommandLine/MissingArgumentConversionResult.cs
13 ./System.CommandLine/OptionExtensions.cs
252 ./System.CommandLine/SymbolResult.cs
20 ./System.CommandLine/SymbolResultSet.cs
20 ./System.CommandLine/ArgumentConversionResultSet.cs
17 ./System.CommandLine/ArgumentResultExtensions.cs
48 ./System.CommandLine/EnumerableExtensions.cs
48 ./System.CommandLine/SuggestionSource.cs
22 ./System.CommandLine/ParserExtensions.cs
15 ./System.CommandLine/SuccessfulArgumentConversionResult.cs
24 ./System.CommandLine/SystemConsole.cs
27 ./System.CommandLine/SymbolResultExtensions.cs
12 ./System.CommandLine/NoArgumentConversionResult.cs
17 ./System.CommandLine/TokenizeError.cs
12 ./System.CommandLine/ISuggestionSource.cs
124 ./System.CommandLine/CommandLineConfiguration.cs
47 ./System.CommandLine/SymbolExtensions.cs
101 ./System.CommandLine/ParseResult.cs
52 ./System.CommandLine/Option.cs
56 ./System.CommandLine/StandardStreamWriter.cs
50 ./System.CommandLine/Argument{T}.cs
34 ./System.CommandLine/OptionResultExtensions.cs
12 ./System.CommandLine/IArgumentArity.cs
70 ./System.CommandLine/AliasedSet.cs
138 ./System.CommandLine/ArgumentArity.cs
40 ./System.CommandLine/OptionResult.cs
81 ./System.CommandLine/CommandResult.cs
30 ./System.CommandLine/Binding/Binder.cs
10 ./System.CommandLine/Binding/IConsoleFactory.cs
23 ./System.CommandLine/Binding/TypeDefaultValueSource.cs
14 ./System.CommandLine/Binding/IMethodDescriptor.cs
34 ./System.CommandLine/Binding/SpecificSymbolValueSource.cs
22 ./System.CommandLine/Binding/DelegateValueSource.cs
32 ./System.CommandLine/Binding/ModelBinder{T}.cs
44 ./System.CommandLine/Binding/CurrentSymbolResultValueSource.cs
60 ./System.CommandLine/Binding/ExpressionHandlerDescriptor.cs
56 ./System.CommandLine/Binding/BoundValue.cs
17 ./System.CommandLine/Binding/ServiceProviderValueSource.cs
13 ./System.CommandLine/Binding/IValueSource.cs
20 ./System.CommandLine/Binding/ValueDescriptorDefaultValueSource.cs
16 ./System.CommandLine/Binding/IValueDescriptor.cs
58 ./System.CommandLine/Binding/MethodInfoHandlerDescriptor.cs
76 ./System.CommandLine/Binding/ModelDescriptor.cs
54 ./System.CommandLine/Binding/ExpressionExtensions.cs
41 ./System.CommandLine/Binding/PropertyDescriptor.cs
58 ./System.CommandLine/Binding/ParameterDescriptor.cs
106 ./System.CommandLine/Binding/BindingContext.cs
201 ./System.CommandLine/Binding/ModelBinder.cs
42 ./System.CommandLine/Binding/HandlerDescriptor.cs
39 ./System.CommandLine/Binding/ConstructorDescriptor.cs
39 ./System.CommandLine/Binding/DelegateHandlerDescriptor.cs
20 ./System.CommandLine/Binding/AnonymousConsoleFactory.cs
10 ./System.CommandLine/Help/IHelpBuilder.cs
40 ./System.CommandLine/Help/DefaultHelpText.cs
686 ./System.CommandLine/Help/HelpBuilder.cs
70 ./System.CommandLine/Builder/CommandLineBuilder.cs
132 ./System.CommandLine/Builder/ArgumentExtensions.cs
141 ./System.CommandLine/Builder/CommandLineBuilderExtensions.cs
26 ./System.CommandLine/Builder/CommandBuilder.cs
17 ./System.CommandLine/ICommand.cs
41 ./System.CommandLine/FailedArgumentTypeConversionResult.cs
20 ./System.CommandLine/FailedArgumentConversionResult.cs
28 ./System.CommandLine/Platform.cs
27 ./System.CommandLine/ParseError.cs
26 ./System.CommandLine/ISymbol.cs
191 ./System.CommandLine/Argument.cs
61 ./System.CommandLine/Command.cs
439 ./System.CommandLine/StringExtensions.cs
46 ./System.CommandLine/IConsole.cs
27 ./System.CommandLine/ArgumentResult.cs
98 ./System.CommandLine.Hosting/InvocationLifetime.cs
68 ./System.CommandLine.Hosting/HostingExtensions.cs
22 ./System.CommandLine.Hosting/System.CommandLine.Hosting.csproj
32 ./System.CommandLine.Hosting/DirectiveConfigurationExtensions.cs
8 ./System.CommandLine.Hosting/InvocationLifetimeOptions.cs
133 ./System.CommandLine.DragonFruit/XmlDocReader.cs
16 ./System.CommandLine.DragonFruit/CommandHelpMetadata.cs
77 ./System.CommandLine.DragonFruit/EntryPointDiscoverer.cs
10 ./System.CommandLine.DragonFruit/targets/System.CommandLine.DragonFruit.props
62 ./System.CommandLine.DragonFruit/targets/System.CommandLine.DragonFruit.targets
311 ./System.CommandLine.DragonFruit/CommandLine.cs
13 ./System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj
43 ./System.CommandLine.Suggest/Program.cs
12 ./System.CommandLine.Suggest/ISuggestionStore.cs
11 ./System.CommandLine.Suggest/ShellType.cs
41 ./System.CommandLine.Suggest/CombineSuggestionRegistration.cs
10 ./System.CommandLine.Suggest/build-and-install.ps1
28 ./System.CommandLine.Suggest/dotnet-suggest-shim.bash
54 ./System.CommandLine.Suggest/DotnetMuxer.cs
23 ./System.CommandLine.Suggest/FileEnumerator.cs
78 ./System.CommandLine.Suggest/SuggestionStore.cs
16 ./System.CommandLine.Suggest/dotnet-suggest-shim.ps1
20 ./System.CommandLine.Suggest/SuggestionShellScriptException.cs
49 ./System.CommandLine.Suggest/dotnet-suggest.csproj
12 ./System.CommandLine.Suggest/ISuggestionRegistration.cs
18 ./System.CommandLine.Suggest/PathExtensions.cs
90 ./System.CommandLine.Suggest/FileSuggestionRegistration.cs
305 ./System.CommandLine.Suggest/SuggestionDispatcher.cs
12 ./System.CommandLine.Suggest/RegistrationPair.cs
35 ./System.CommandLine.Suggest/DotnetProfileDirectory.cs
64 ./System.CommandLine.Suggest/GlobalToolsSuggestionRegistration.cs
12 ./System.CommandLine.Suggest/StringExtensions.cs
33 ./System.CommandLine.Suggest/SuggestionShellScriptHandler.cs
26 ./System.CommandLine.Rendering/ITerminal.cs
50 ./System.CommandLine.Rendering/AnsiControlCode.cs
22 ./System.CommandLine.Rendering/EntireConsoleRegion.cs
34 ./System.CommandLine.Rendering/ConsoleExtensions.cs
220 ./System.CommandLine.Rendering/ContentRenderingSpanVisitor.cs
57 ./System.CommandLine.Rendering/FormatSpan.cs
71 ./System.CommandLine.Rendering/SystemConsoleTerminal.cs
15 ./System.CommandLine.Rendering/System.CommandLine.Rendering.csproj
25 ./System.CommandLine.Rendering/RecordingWriter.cs
74 ./System.CommandLine.Rendering/VirtualTerminal.cs
57 ./System.CommandLine.Rendering/ContainerSpan.cs
33 ./System.CommandLine.Rendering/Size.cs
347 ./System.CommandLine.Rendering/TestTerminal.cs
22 ./System.CommandLine.Rendering/CursorControlSpan.cs
91 ./System.CommandLine.Rendering/SpanVisitor.cs
19 ./System.CommandLine.Rendering/RgbColor.cs
64 ./System.CommandLine.Rendering/CommandLineBuilderExtensions.cs
118 ./System.CommandLine.Rendering/ConsoleRenderer.cs
24 ./System.CommandLine.Rendering/StyleSpan.cs
76 ./System.CommandLine.Rendering/Terminal.cs
28 ./System.CommandLine.Rendering/FileRenderingSpanVisitor.cs
143 ./System.CommandLine.Rendering/VirtualTerminalMode.cs
25 ./System.CommandLine.Rendering/ColorSpan.cs
13 ./System.CommandLine.Rendering/OutputMode.cs
109 ./System.CommandLine.Rendering/NonAnsiRenderingSpanVisitor.cs
39 ./System.CommandLine.Rendering/ContentSpan.cs
129 ./System.CommandLine.Rendering/Ansi.cs
64 ./System.CommandLine.Rendering/Region.cs
12 ./System.CommandLine.Rendering/IRenderable.cs
29 ./System.CommandLine.Rendering/Span.cs
149 ./System.CommandLine.Rendering/SpanFormatter.cs
60 ./System.CommandLine.Rendering/TerminalBase.cs
132 ./System.CommandLine.Rendering/Views/StackLayoutView.cs
25 ./System.CommandLine.Rendering/Views/ItemsView.cs
36 ./System.CommandLine.Rendering/Views/RowDefinition.cs
35 ./System.CommandLine.Rendering/Views/ContentView{T}.cs
93 ./System.CommandLine.Rendering/Views/ScreenView.cs
14 ./System.CommandLine.Rendering/Views/TableViewColumn.cs
12 ./System.CommandLine.Rendering/Views/SizeMode.cs
11 ./System.CommandLine.Rendering/Views/Orientation.cs
113 ./System.CommandLine.Rendering/Views/ContentView.cs
242 ./System.CommandLine.Rendering/Views/GridView.cs
16 ./System.CommandLine.Rendering/Views/View.cs
125 ./System.CommandLine.Rendering/Views/TableView.cs
53 ./System.CommandLine.Rendering/Views/LayoutView.cs
38 ./System.CommandLine.Rendering/Views/ColumnDefinition.cs
56 ./System.CommandLine.Rendering/ForegroundColorSpan.cs
75 ./System.CommandLine.Rendering/WrappingExtensions.cs
132 ./System.CommandLine.Rendering/AnsiRenderingSpanVisitor.cs
144 ./System.CommandLine.Rendering/SpanMeasuringVisitor.cs
18 ./System.CommandLine.Rendering/StringExtensions.cs
56 ./System.CommandLine.Rendering/BackgroundColorSpan.cs


Т.е., например, есть страница со списком целей, которых авторы хотят добиться:
https://github.com/dotnet/command-line-api/wiki/Technical-motivations
на какой объём развернётся описание того, во что это вылилось в коде библиотеки?

Я уж не спрашиваю, есть ли где книжка на русском языке, где всё это детально расписано по-русски...
Отредактировано 31.08.2019 16:57 Эйнсток Файр . Предыдущая версия . Еще …
Отредактировано 31.08.2019 16:56 Эйнсток Файр . Предыдущая версия .
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.