Closed Sergio0694 closed 1 year ago
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 https://github.com/CommunityToolkit/dotnet/pull/581#discussion_r1084083044_
Not so good to do this call here. Better:
_Originally posted by @Youssef1313 in https://github.com/CommunityToolkit/dotnet/pull/581#discussion_r1084083044_