Skip to content

Commit

Permalink
fixed documentation generation for dynamic keyword (fixes #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doraku committed Apr 10, 2020
1 parent 74286e2 commit d0950fd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
</PropertyGroup>

<PropertyGroup Label="Package">
<Version>0.6.0</Version>
<Version>0.6.1</Version>
<PackageReleaseNotes>
breaking change:
changed netcoreapp to v3.0
do not generate base homepage if there is only one namespace present and no DefaultDocumentationHome specified nor any AssemblyDoc

fixed operator documentation page overlapping names
fixed documentation generation for dynamic keyword
</PackageReleaseNotes>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion source/DefaultDocumentation/DefaultDocumentation.targets
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

<ItemGroup>
<None Remove="DefaultDocumentation.targets" />
<Content Include="..\..\image\logo.png" PackagePath="\" Visible="false"/>
<None Include="bin\Release\net472\*.dll" Pack="true" PackagePath="tools\" Visible="false" />
<Content Include="..\..\image\logo.png" PackagePath="\" Visible="false"/>
<Content Include="build\DefaultDocumentation.targets" PackagePath="build\" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions source/DefaultDocumentation/DocumentationWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ string HandleParameterizedType(ParameterizedType genericType)
TypeKind.Array when type is TypeWithElementType arrayType => GetTypeLink(item, arrayType.ElementType) + "System.Array".AsDotNetApiLink("[]"),
TypeKind.ByReference when type is TypeWithElementType innerType => GetTypeLink(item, innerType.ElementType),
TypeKind.TypeParameter => item.TryGetTypeParameterDocItem(type.Name, out TypeParameterDocItem typeParameter) ? GetInnerLink(typeParameter) : type.Name,
TypeKind.Dynamic => "[dynamic](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/using-type-dynamic 'dynamic')",
_ when type is ParameterizedType genericType => HandleParameterizedType(genericType),
_ => GetLink(type.GetDefinition().GetIdString())
};
Expand Down
2 changes: 1 addition & 1 deletion source/Dummy/DummyClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class DummyNested<T>
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public int this[int index]
public dynamic this[int index]
{
get => index;
}
Expand Down
4 changes: 2 additions & 2 deletions source/Dummy/documentation/Dummy-DummyClass-this-int-.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
## DummyClass.this[int] Property
dummy
```csharp
public int this[int index] { get; }
public dynamic this[int index] { get; }
```
#### Parameters
<a name='Dummy-DummyClass-this-int--index'></a>
`index` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')


#### Property Value
[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')
[dynamic](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/types/using-type-dynamic 'dynamic')

0 comments on commit d0950fd

Please sign in to comment.