Current filter:
                                You should refresh the page.
                                  • This problem actually applies to the legacy CodeRush as well it seems.

                                    Consider the following classes:

                                    [C#]
                                    class MyAttribute : Attribute { public MyAttribute(bool isSet) { IsSet = isSet; } public bool IsSet { get; } } [My(true)] class Program { static void Main(string[] args) { bool value = true; MyAttribute attr = new MyAttribute(false); attr = new MyAttribute(value); } }

                                    If you place the cursor on the isSet parameter of the MyAttribute constructor, and invoke the "Reverse Boolean" refactoring, the usages are updated everywhere, except when the class is used as an attribute.  So [My(true)] is left unchanged, when it should have been changed to [My(false)] .

                                • Alex Z (DevExpress) 08.18.2016

                                  Peter,

                                  Thank you for the provided sample code. I have reproduced this issue and passed it to our developers to fix.

                                • Peter Palotas 08.19.2016

                                  It seems this problem applies to the "Boolean to enum" conversion as well. 

                                • Alex Z (DevExpress) 08.19.2016

                                  Peter,

                                  Thank you for the additional information. It seems that it is a similar issue but in different refactoring, and it will be better to discuss it in a separate thread.
                                  So, I have created a new ticket on your behalf: Boolean to Enum refactoring does not update ctor parameters in attributes. Please refer to it for further correspondence.

                                • Peter Palotas 08.19.2016

                                  Great, thank you very much.

                                1 Solution

                                Creation Date Importance Sort by

                                Fixed: