Skip to content

Commit

Permalink
fixed nested type not showing parent type in name
Browse files Browse the repository at this point in the history
release 0.5.4
  • Loading branch information
Doraku committed Feb 23, 2020
1 parent 7aac07a commit b0fee8c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<PropertyGroup Label="Package">
<Version>0.5.3</Version>
<Version>0.5.4</Version>
<PackageReleaseNotes>
fixed TypeDocItem writing members of nested types
fixed nested type not showing parent type in name
</PackageReleaseNotes>
</PropertyGroup>
</Project>
11 changes: 10 additions & 1 deletion source/DefaultDocumentation/Model/DocItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ internal abstract class DocItem
| ConversionFlags.UseFullyQualifiedEntityNames
};

private static readonly CSharpAmbience TypeNameAmbience = new CSharpAmbience
{
ConversionFlags =
ConversionFlags.ShowParameterList
| ConversionFlags.ShowTypeParameterList
| ConversionFlags.ShowDeclaringType
| ConversionFlags.UseFullyQualifiedTypeNames
};

private static readonly CSharpAmbience NameAmbience = new CSharpAmbience
{
ConversionFlags =
Expand Down Expand Up @@ -47,7 +56,7 @@ protected DocItem(DocItem parent, string id, string fullName, string name, XElem
}

protected DocItem(DocItem parent, IEntity entity, XElement documentation)
: this(parent, entity.GetIdString(), FullNameAmbience.ConvertSymbol(entity), NameAmbience.ConvertSymbol(entity), documentation)
: this(parent, entity.GetIdString(), FullNameAmbience.ConvertSymbol(entity), (entity is ITypeDefinition ? TypeNameAmbience : NameAmbience).ConvertSymbol(entity), documentation)
{ }

public abstract void WriteDocumentation(DocumentationWriter writer);
Expand Down

0 comments on commit b0fee8c

Please sign in to comment.