Skip to content

Commit fffdd1b

Browse files
authored
Merge 869a78d into 476a2a3
2 parents 476a2a3 + 869a78d commit fffdd1b

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

samples/seed/dotnet/assembly/BuildFromAssembly.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
8+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
89
</PropertyGroup>
910

1011
<ItemGroup>

samples/seed/dotnet/assembly/Class1.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,19 @@ public static void HelloWorld() { }
1818
[EditorBrowsable(EditorBrowsableState.Never)]
1919
public void HiddenAPI() { }
2020
}
21+
22+
public unsafe struct Issue5432
23+
{
24+
private fixed char Name0[30];
25+
26+
public string Name
27+
{
28+
get
29+
{
30+
fixed (char* name = Name0)
31+
{
32+
return new string((char*)name);
33+
}
34+
}
35+
}
36+
}

src/Docfx.Dotnet/SymbolFilter.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public SymbolFilter(ExtractMetadataConfig config, DotnetApiOptions options)
2626

2727
public bool IncludeApi(ISymbol symbol)
2828
{
29-
return IsSymbolAccessible(symbol) && IncludeApiCore(symbol);
29+
return !IsCompilerGeneratedDisplayClass(symbol) && IsSymbolAccessible(symbol) && IncludeApiCore(symbol);
3030

3131
bool IncludeApiCore(ISymbol symbol)
3232
{
@@ -45,6 +45,11 @@ bool IncludeApiDefault(ISymbol symbol)
4545

4646
return symbol.ContainingSymbol is null || IncludeApiCore(symbol.ContainingSymbol);
4747
}
48+
49+
static bool IsCompilerGeneratedDisplayClass(ISymbol symbol)
50+
{
51+
return symbol.Name.Contains('<') || symbol.Name.Contains('>');
52+
}
4853
}
4954

5055
public bool IncludeAttribute(ISymbol symbol)

0 commit comments

Comments
 (0)