Skip to content
Alessandro Del Sole edited this page Sep 6, 2016 · 4 revisions

Welcome to the DelSole.CrossAnalyzers wiki!

DelSole.CrossAnalyzers is a collection of code analyzers and refactorings for both C# and Visual Basic, intended to work on multiple platforms and to simplify common tasks. Analyzers are available as you type, refactorings can be invoked right-clicking on a type definition.

Available analyzers

ObservableCollection analyzer

Detects assignments of List objects to ItemsSource and DataContext properties in platforms such as WPF, UWP, Xamarin where you should use ObservableCollection instead

DateTimeOffset Analyzer

Detects assignments of DateTime to objects of type DateTimeOffset

Async Suffix Analyzer

Detects and fixes missing Async suffix on async method names.

Async Void Analyzer (Visual Basic only)

Detects and fixes async Sub that are not event handlers changing to Async Task

Available refactorings

Implement INotifyPropertyChanged interface

Implements the INotifyPropertyChanged interface on a class that exposes any properties, providing explicit setters and OnPropertyChanged method invocation. In Visual Basic, the refactoring is available right-clicking a property declaration instead of a class. To be fixed soon.

Credits: this refactoring has been built using the same-named sample refactoring from the Roslyn Team, but with a different implementation of the interface. See original at: https://github.com/dotnet/roslyn/tree/master/src/Samples

Make ViewModelBase class

Creates a ViewModelBase class from a class declaration for MVVM.

Make RelayCommand class

Creates a RelayCommand class from a class declaration for MVVM.

Make ViewModel class (C# only)

Creates a ViewModel class from a business object, for MVVM.

Clone this wiki locally