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

Allow to collect analyzers annotated with ExportAnalyzerAttribute without MEF #3239

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

Rpinski
Copy link
Member

@Rpinski Rpinski commented Jul 19, 2024

This helps users of ILSpyX not using MEF.
Currently only ILSpyX assembly itself is searched
for annotated analyzer types.

…hout MEF

This helps users of ILSpyX not using MEF.
Currently only ILSpyX assembly itself is searched
for annotated analyzer types.
foreach (var type in typeof(ExportAnalyzerAttribute).Assembly.GetTypes())
{
var exportAnalyzerAttribute = type.GetCustomAttribute(typeof(ExportAnalyzerAttribute), false) as ExportAnalyzerAttribute;
if (exportAnalyzerAttribute is not null)
Copy link
Member

Choose a reason for hiding this comment

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

                           if (type.GetCustomAttribute(typeof(ExportAnalyzerAttribute), false) is ExportAnalyzerAttribute exportAnalyzerAttribute)

@christophwille christophwille merged commit d0bdf18 into master Jul 20, 2024
9 checks passed
@christophwille christophwille deleted the ilspyx-collect-analyzers branch July 27, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants