Bug Report T428182
Visible to All Users

Code Cleanup is no longer converting non-implemented properties to autoimplemented

created 8 years ago

[DevExpress Support Team: CLONED FROM T411203: Using custom plugins with the roslyn version]
I've just installed the September patch to VS2015 update 3, and code cleanup is no long converting the properties mentioned above to auto-implemented

So lets say you have a class like this one:

Visual Basic
Public Class CRTest Public Property ExemptionCertificate As String Get Throw New NotImplementedException() End Get Set(value As String) Throw New NotImplementedException() End Set End Property End Class

Convert to auto-implemented is enabled in code cleanup, but it doesn't do anything with the property in the above example. A regular property with a backing variable is correctly transformed. If I explicitly invoke the convert to auto implemented property refactoring on it then it does work, but since my prime use for this is to fix a bunch of properties created when implementing an interface, this would be a tedious way to handle it.

Also relevant, I suspect: If I add the single backed property I described above, and invoke the refactoring menu, I don't get the "all" variant of the refactoring. If add a second backed property and invoke the menu I *do* get the "all" variant. Looks like the NotImplementedException properties are now being excluded from whatever filter you are applying to detect if there are single or multiple candidate properties

Show previous comments (8)
KO KO
Kevin O'Donovan 8 years ago

    Hi Alex,
    Your screenshot is showing properties with backing fields. I'm specifically referring to unimplemented properties - see my screencast to see what I mean. I have attached my settings anyway, in case there is a conflict in them

    Kev

    KO KO
    Kevin O'Donovan 8 years ago

      Here is a test interface/class that exhibits the problem. The class properties were autogenerated to implement the interface, and I would like to use the refactoring to convert them all to auto-implemented properties. Since the latest update, this is no longer possible, I can only do them one at a time:

      Visual Basic
      Imports ClassLibrary1 Public Interface ITest Property Name As String Property Address As String End Interface Public Class Class1 Implements ITest Public Property Address As String Implements ITest.Address Get Throw New NotImplementedException() End Get Set(value As String) Throw New NotImplementedException() End Set End Property Public Property Name As String Implements ITest.Name Get Throw New NotImplementedException() End Get Set(value As String) Throw New NotImplementedException() End Set End Property End Class
      DevExpress Support Team 8 years ago

        Kevin,

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

        Answers approved by DevExpress Support

        created 8 years ago (modified 8 years ago)

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.