Convert a trivial dependency property callback to a lambda
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.ConvertTrivialCallbackToLambdaArtifactOpenRewrite.Recipes.CSharp.CodeQualityA PropertyChangedCallback, CoerceValueCallback or ValidateValueCallback whose body is a single expression is inlined as a lambda at the registration, so the callback sits next to the property it belongs to. The method is removed when nothing else used it.
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.ConvertTrivialCallbackToLambdaIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality