← All recipes
Moderne licensed

Default value is a shared reference type

Recipe IDOpenRewrite.Recipes.CSharp.CodeQuality.Wpf.FindSharedReferenceTypeDefaultValueArtifactOpenRewrite.Recipes.CSharp.CodeQuality

A reference type constructed as a DependencyProperty default value is shared by every instance of the owner, so a mutation through one instance is seen by all of them. Flags such a default value.

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

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

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