Skip to content

Move two symbol diagnostics in [ObservableProperty] generator to analyzers #580

@Sergio0694

Description

@Sergio0694

Describe the bug

I've missed a couple of IncrementalValuesProvider<ISymbol> in the observable property generator, which should definitely move to the analyzer now that that's in place instead. Should make the generator a bit faster and also reduce memory use.

IncrementalValuesProvider<INamedTypeSymbol> classSymbols =
context.SyntaxProvider
.CreateSyntaxProvider(
static (node, _) => node is ClassDeclarationSyntax { AttributeLists.Count: > 0 },
static (context, _) => (INamedTypeSymbol)context.SemanticModel.GetDeclaredSymbol(context.Node)!);

Nuget packages

  • CommunityToolkit.Common
  • CommunityToolkit.Diagnostics
  • CommunityToolkit.HighPerformance
  • CommunityToolkit.Mvvm (aka MVVM Toolkit)

Metadata

Metadata

Assignees

Labels

analyzer 👓A new analyzer being implemented or updatedmvvm-toolkit 🧰Issues/PRs for the MVVM Toolkitoptimization ☄Performance or memory usage improvements

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions