diff --git a/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser.csproj b/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/CSharpAPIParser.csproj similarity index 69% rename from tools/apiview/parsers/csharp-api-parser/CSharpAPIParser.csproj rename to tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/CSharpAPIParser.csproj index 914dbe16205..46e67f8e934 100644 --- a/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser.csproj +++ b/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/CSharpAPIParser.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/tools/apiview/parsers/csharp-api-parser/Program.cs b/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/Program.cs similarity index 100% rename from tools/apiview/parsers/csharp-api-parser/Program.cs rename to tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/Program.cs diff --git a/tools/apiview/parsers/csharp-api-parser/TreeToken/CodeFileBuilder.cs b/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/TreeToken/CodeFileBuilder.cs similarity index 99% rename from tools/apiview/parsers/csharp-api-parser/TreeToken/CodeFileBuilder.cs rename to tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/TreeToken/CodeFileBuilder.cs index 0660e7aad4c..d6d158680f5 100644 --- a/tools/apiview/parsers/csharp-api-parser/TreeToken/CodeFileBuilder.cs +++ b/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser/TreeToken/CodeFileBuilder.cs @@ -747,7 +747,7 @@ private bool IsAccessible(ISymbol s) case Accessibility.Public: return true; case Accessibility.Internal: - return s.GetAttributes().Any(a => a.AttributeClass.Name == "FriendAttribute"); + return s.GetAttributes().Any(a => a.AttributeClass?.Name == "FriendAttribute"); default: return IsAccessibleExplicitInterfaceImplementation(s); } diff --git a/tools/apiview/parsers/csharp-api-parser/ci.yml b/tools/apiview/parsers/csharp-api-parser/ci.yml new file mode 100644 index 00000000000..14244b5077f --- /dev/null +++ b/tools/apiview/parsers/csharp-api-parser/ci.yml @@ -0,0 +1,27 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. +trigger: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + paths: + include: + - tools/apiview/parsers/csharp-api-parser + +pr: + branches: + include: + - main + - feature/* + - release/* + - hotfix/* + paths: + include: + - tools/apiview/parsers/csharp-api-parser + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml + parameters: + PackageDirectory: $(Build.SourcesDirectory)/tools/apiview/parsers/csharp-api-parser/CSharpAPIParser diff --git a/tools/apiview/parsers/csharp-api-parser/csharp-api-parser.sln b/tools/apiview/parsers/csharp-api-parser/csharp-api-parser.sln index ad79aafb026..38937cc7dac 100644 --- a/tools/apiview/parsers/csharp-api-parser/csharp-api-parser.sln +++ b/tools/apiview/parsers/csharp-api-parser/csharp-api-parser.sln @@ -7,7 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "APIView", "..\..\..\..\src\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ClientSdk.Analyzers", "..\..\..\..\src\dotnet\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers\Azure.ClientSdk.Analyzers.csproj", "{4ECD9A58-ABEB-4285-A5D7-7CDA8A558AE0}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpAPIParser", "CSharpAPIParser.csproj", "{EB159E3D-9732-4EB3-A3C2-817475B9D749}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSharpAPIParser", "CSharpAPIParser\CSharpAPIParser.csproj", "{EB159E3D-9732-4EB3-A3C2-817475B9D749}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution