-
Notifications
You must be signed in to change notification settings - Fork 352
Closed
Labels
analyzer 👓A new analyzer being implemented or updatedA new analyzer being implemented or updatedmvvm-toolkit 🧰Issues/PRs for the MVVM ToolkitIssues/PRs for the MVVM Toolkitoptimization ☄Performance or memory usage improvementsPerformance or memory usage improvements
Description
context.Compilation.GetTypeByMetadataName
Not so good to do this call here. Better:
context.RegisterCompilationStartAction(context =>
{
var notifyDataErrorInfoAttributeSymbol = context.Compilation.GetTypeByMetadataName("CommunityToolkit.Mvvm.ComponentModel.NotifyDataErrorInfoAttribute");
if (notifyDataErrorInfoAttributeSymbol is null)
{
return;
}
context.RegisterSymbolAction(context =>
{
// Logic goes here.
}
}
Originally posted by @Youssef1313 in #581 (comment)
Metadata
Metadata
Assignees
Labels
analyzer 👓A new analyzer being implemented or updatedA new analyzer being implemented or updatedmvvm-toolkit 🧰Issues/PRs for the MVVM ToolkitIssues/PRs for the MVVM Toolkitoptimization ☄Performance or memory usage improvementsPerformance or memory usage improvements