Skip to content

Commit

Permalink
fixed inheritdoc when getting documentation from mscorlib entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Doraku committed Apr 16, 2021
1 parent e68cf45 commit 1d2ceda
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
21 changes: 21 additions & 0 deletions documentation/NEXT_RELEASENOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
breaking changes:
changed slightly file name generation for FullName and Name FileNameMode
changed tool to msbuild task to remove runtime dependencies (#42)
renamed DefaultDocumentationNestedTypeVisibility to DefaultDocumentationNestedTypeVisibilities
renamed DefaultDocumentationWikiLinks to DefaultDocumentationRemoveFileExtensionFromLinks
renamed DefaultDocumentationHome to DefaultDocumentationAssemblyPageName


fixed see link for await, false and true langword values
fixed inheritdoc when getting documentation from mscorlib entity


added support for source and region attributes in code element (#40 thanks to @basvanderlaken)
added support for language attributes in code element
added See Also section at the end of pages grouping all seealso elements
added support for see and seealso displayed text change with element value
added dotnet tool package (#25)
added DefaultDocumentationGeneratedPages property to set which element will have its own page (#36)
added cross assembly documentation linking (#7)
added support for href attribute in see and seealso element
added ExplicitInterfaceImplementations items to documentation
6 changes: 5 additions & 1 deletion source/DefaultDocumentation.Common/DocItemReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private bool TryGetDocumentation(IEntity entity, out XElement documentation)

if (!_documentationProviders.TryGetValue(entity.ParentModule, out IDocumentationProvider documentationProvider))
{
documentationProvider = XmlDocLoader.LoadDocumentation(entity.ParentModule.PEFile);
documentationProvider = XmlDocLoader.LoadDocumentation(entity.ParentModule.PEFile) ?? XmlDocLoader.MscorlibDocumentation;
_documentationProviders.Add(entity.ParentModule, documentationProvider);
}

Expand All @@ -165,6 +165,10 @@ private bool TryGetDocumentation(IEntity entity, out XElement documentation)
{
type.GetBaseTypeDefinitions().FirstOrDefault(t => TryGetDocumentation(t, out baseDocumentation));
}
else if (entity is IMember member && member.IsExplicitInterfaceImplementation)
{
return TryGetDocumentation(member.ExplicitlyImplementedInterfaceMembers.FirstOrDefault(), out documentation);
}
else
{
string id = entity.GetIdString().Substring(entity.DeclaringTypeDefinition.GetIdString().Length);
Expand Down

0 comments on commit 1d2ceda

Please sign in to comment.