← All recipes
Moderne licensed

Containing type should be used as registered owner

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RegisterContainingTypeAsRoutedEventOwnerArtifactOpenRewrite.Recipes.CSharp.CodeQuality

A RoutedEvent must name the type that declares it as owner in its EventManager.RegisterRoutedEvent call. Replaces the typeof(...) owner argument with the containing type.

Single recipecsharpcode-qualityProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.RegisterContainingTypeAsRoutedEventOwner

If the recipe isn’t available locally, install it with:

mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality