Skip to content

Add nestedName function for C##2555

Merged
koesie10 merged 1 commit intomainfrom
koesie10/nested-name-csharp
Jun 27, 2023
Merged

Add nestedName function for C##2555
koesie10 merged 1 commit intomainfrom
koesie10/nested-name-csharp

Conversation

@koesie10
Copy link
Copy Markdown
Member

Similar to #2553, this changes the C# query to correctly report the name of nested types. I couldn't find a nestedName method for C#, so this adds one in the AutomodelVsCode library.

C# seems to use + as a separator for nested types, as reported by getQualifiedName():

GitHub.Nested.MyFirstClass+NestedClass

The getApiName() will now report:

GitHub.Nested#MyFirstClass+NestedClass.Test()

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

Similar to #2553, this
changes the C# query to correctly report the name of nested types. I
couldn't find a `nestedName` method for C#, so this adds one in the
`AutomodelVsCode` library.

C# seems to use `+` as a separator for nested types, as reported by
`getQualifiedName()`:

```
GitHub.Nested.MyFirstClass+NestedClass
```

The `getApiName()` will now report:

```
GitHub.Nested#MyFirstClass+NestedClass.Test()
```
Copy link
Copy Markdown
Contributor

@starcke starcke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, but probably good to check with the C# team.

@koesie10 koesie10 marked this pull request as ready for review June 27, 2023 14:29
@koesie10 koesie10 requested a review from a team as a code owner June 27, 2023 14:29
@koesie10 koesie10 merged commit 1579859 into main Jun 27, 2023
@koesie10 koesie10 deleted the koesie10/nested-name-csharp branch June 27, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants