Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiDiff: Move TryGetRecordConstructor from GenAPI.INamedTypeSymbolExtensions up to ApiSymbolExtensions.SymbolExtensions #45801

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlossanlop
Copy link
Member

@carlossanlop carlossanlop commented Jan 8, 2025

This PR is part of the work needed to create an ApiDiff tool that reuses some of the code from Microsoft.DotNet.GenAPI. The idea is to make the larger PR smaller and make it easier to review: #45389

This change moves an extension method from the Microsoft.DotNet.GenAPI project to the higher Microsoft.DotNet.ApiSymbolExtensions.SymbolExtensions project, so it's available more generally.

PR #45806 depends on this change being merged first.

…ymbolExtesions up to Microsoft.DotNet.ApiSymbolExtensions.SymbolExtensions.
Comment on lines +131 to +134
// Locates constructor generated by the compiler for `record Foo(...)` syntax
// If the type is a record and the compiler generated constructor is found it will be returned, otherwise null.
// The compiler will not generate a constructor in the case where the user defined it themself without using an argument list
// in the record declaration, or if the record has no parameters.
Copy link
Member

Choose a reason for hiding this comment

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

Please change this to triple slash comments as this method and type is public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants