← All recipes
Moderne licensed

Add [ConstructorArgument]

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.AddConstructorArgumentAttributeArtifactOpenRewrite.Recipes.CSharp.CodeQuality

A MarkupExtension property assigned from a constructor parameter should be annotated with [ConstructorArgument("parameterName")] so XAML can round-trip the positional and the named form of the extension. Adds the missing attribute.

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.AddConstructorArgumentAttribute

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

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