Doraku / DefaultDocumentation

Create a simple markdown documentation from the Visual Studio xml one.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The `ConfigName` for `ExplicitInterfaceImplementationsSection` Seems Incorrect

AristurtleDev opened this issue · comments

I believe the ConfigName value for ExplicitInterfaceImplementationsSection is incorrect.

In the README.md it states to use the name ExplicitInterfaceImplementation for the section name in the .json config file. Note that both I characters in Interface and Implementation are capitalized.

However, when using this as the section name, like the following:

{  
  "Sections": [
    "ExplicitInterfaceImplementations"
  ]
}

DefaultDocumentation throws the following exception

Unhandled exception. System.Exception: Section 'ExplicitInterfaceImplementations' not found
   at DefaultDocumentation.Internal.Context.<>c__DisplayClass1_1.<.ctor>b__8(String id) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Internal\Context.cs:line 37
   at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at DefaultDocumentation.Internal.Context..ctor(JObject configuration, Type[] availableTypes) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Internal\Context.cs:line 35
   at DefaultDocumentation.Internal.GeneralContext..ctor(JObject config, Type[] availableTypes, Settings settings, IReadOnlyDictionary`2 items) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Internal\GeneralContext.cs:line 30
   at DefaultDocumentation.Generator..ctor(Target loggerTarget, IRawSettings settings) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:line 116
   at DefaultDocumentation.Generator.Execute(Target loggerTarget, IRawSettings settings) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:line 195
   at DefaultDocumentation.Program.<>c.<Main>b__0_1(SettingsArgs a) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Console\Program.cs:line 24
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at DefaultDocumentation.Program.Main(String[] args) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Console\Program.cs:line 18

When looking at the source code, it shows that the ExplicitInterfaceImplementation class uses lowercase i characters for interface and implementation in the ConfigName value.

If I change the section name in my .json config file to use the lowercase version like this:

{  
  "Sections": [
    "Explicitinterfaceimplementations"
  ]
}

then no exception is thrown and it works as expected.

Thank you for reporting!