Namespace Blazing.Mvvm.Analyzers.Analyzers
Classes
- CascadingParameterVsInjectAnalyzer
-
Analyzer that suggests using [Inject] for services instead of [CascadingParameter] in MVVM components. Analyzes components that inherit from MvvmComponentBase/MvvmOwningComponentBase/MvvmLayoutComponentBase.
- CommandPatternAnalyzer
-
Analyzer that detects methods that should be exposed as RelayCommand instead of direct method calls.
- DisposePatternAnalyzer
-
Analyzer that ensures ViewModels properly implement IDisposable when using event subscriptions or unmanaged resources.
- EventCallbackTwoWayBindingAnalyzer
-
Detects EventCallback-based automatic two-way binding opportunities and obsolete manual patterns.
- LifecycleMethodOverrideAnalyzer
-
Detects ViewModel lifecycle methods that hide, rather than override, their virtual base method.
- MessengerRegistrationLifetimeAnalyzer
-
Analyzer that detects messenger registrations without corresponding unregistrations.
- MvvmComponentBaseUsageAnalyzer
-
Analyzer that ensures Blazor components using ViewModels inherit from MvvmComponentBase<TViewModel>.
- MvvmNavLinkTypeSafetyAnalyzer
-
Analyzer that validates MvvmNavLink TViewModel parameter references valid registered ViewModels. Works with both C# generic syntax and Razor component attribute syntax.
- MvvmOwningComponentBaseUsageAnalyzer
-
Analyzer that detects when MvvmOwningComponentBase should be used instead of MvvmComponentBase for ViewModels that inject scoped services like DbContext.
- NavigationTypeSafetyAnalyzer
-
Analyzer that ensures NavigateTo<TViewModel>() calls reference ViewModels with valid route mappings. Validates that the target ViewModel inherits from ViewModelBase AND has [ViewModelDefinition] attribute.
- NotifyPropertyChangedForAnalyzer
-
Analyzer that suggests [NotifyPropertyChangedFor] for dependent computed properties.
- ObservablePropertyAnalyzer
-
Analyzer that detects properties that should use [ObservableProperty] or SetProperty for proper change notification.
- RelayCommandAsyncAnalyzer
-
Detects asynchronous RelayCommand methods that return void.
- RouteParameterBindingAnalyzer
-
Analyzer that ensures @page route parameters have corresponding [Parameter] or [ViewParameter] properties.
- RouteViewModelMappingAnalyzer
-
Analyzer that detects @page directives without corresponding ViewModels.
- ServiceInjectionAnalyzer
-
Analyzer that detects [Inject] attribute usage in ViewModels and recommends constructor injection instead. In Blazor MVVM, ViewModels should use constructor injection, not property injection with [Inject].
- StateHasChangedOveruseAnalyzer
-
Analyzer that detects manual StateHasChanged() calls that may be unnecessary with proper property notifications.
- ViewModelBaseInheritanceAnalyzer
-
Analyzer that ensures ViewModels inherit from ViewModelBase, RecipientViewModelBase, or ValidatorViewModelBase.
- ViewModelDefinitionAttributeAnalyzer
-
Analyzer that ensures ViewModels have the [ViewModelDefinition] attribute for proper DI registration.
- ViewModelKeyConsistencyAnalyzer
-
Analyzer that detects ViewModelKey mismatches between components and their ViewModels. Ensures that a component's [ViewModelKey("X")] attribute matches its ViewModel's ViewModelDefinition(Key="X").
- ViewParameterAttributeAnalyzer
-
Analyzer that ensures properties marked with [ViewParameter] in ViewModels have corresponding [Parameter] properties in Views. UPDATED: Using RegisterSymbolAction pattern like other working analyzers.