diff --git a/Release.bat b/Release.bat index 4acb8f39..3706583a 100644 --- a/Release.bat +++ b/Release.bat @@ -3,7 +3,7 @@ DEL /q package dotnet clean source -c Release -dotnet test source -c Release -r build +dotnet test source -c Release IF %ERRORLEVEL% GTR 0 GOTO :end diff --git a/source/DefaultDocumentation.Common/Generator.cs b/source/DefaultDocumentation.Common/Generator.cs index 21e4c8a2..540c859e 100644 --- a/source/DefaultDocumentation.Common/Generator.cs +++ b/source/DefaultDocumentation.Common/Generator.cs @@ -112,7 +112,9 @@ private void AddSetting( _configuration.Property(name, StringComparison.OrdinalIgnoreCase)?.Remove(); _configuration.Add(name, JToken.FromObject(convert(value)!, _serializer)); } - else if (!Equals(defaultValue, default(TConfig))) + else if (!Equals(defaultValue, default(TConfig)) + && (!(_configuration.Property(name, StringComparison.OrdinalIgnoreCase) is { } configurationProperty) + || configurationProperty.Value?.Type is null or JTokenType.Null)) { _configuration.Property(name, StringComparison.OrdinalIgnoreCase)?.Remove(); _configuration.Add(name, JToken.FromObject(defaultValue!, _serializer)); @@ -154,7 +156,7 @@ private void WriteLinks() using StreamWriter writer = _context.Settings.LinksOutputFile.CreateText(); - PageContext context = new(_context, new ExternDocItem("", "", "")); + PageContext context = new(_context, new ExternDocItem("T:", "", "")); writer.WriteLine(_context.Settings.LinksBaseUrl); foreach (DocItem item in _context.Items.Values.Where(i => i is not ExternDocItem and not AssemblyDocItem and not TypeParameterDocItem and not ParameterDocItem)) diff --git a/source/DefaultDocumentation.Common/Internal/GeneralContext.cs b/source/DefaultDocumentation.Common/Internal/GeneralContext.cs index 156d2796..371d5268 100644 --- a/source/DefaultDocumentation.Common/Internal/GeneralContext.cs +++ b/source/DefaultDocumentation.Common/Internal/GeneralContext.cs @@ -82,7 +82,7 @@ public GeneralContext( foreach (KeyValuePair pair in _contexts) { - Settings.Logger.Info($"FileNameFactory that will be used for {pair.Key.Name}: {pair.Value.FileNameFactory!.GetType().AssemblyQualifiedName}"); + Settings.Logger.Info($"FileNameFactory that will be used for {pair.Key.Name}: {pair.Value.FileNameFactory?.GetType().AssemblyQualifiedName}"); Settings.Logger.Info($"SectionWriter that will be used for {pair.Key.Name}:{string.Concat(pair.Value.Sections?.Select(s => $"{Environment.NewLine} {s.GetType().AssemblyQualifiedName}") ?? [])}"); } }