Avoid side effects in attached property CLR accessors
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Wpf.FindSideEffectsInAttachedPropertyAccessorArtifactOpenRewrite.Recipes.CSharp.CodeQualityXAML bypasses the CLR Get/Set methods of an attached property and calls GetValue/SetValue directly, so any other work an accessor does runs only when the property is set from code. Flags the offending statement.
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.FindSideEffectsInAttachedPropertyAccessorIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality