Bug Report T548198
Visible to All Users

Refactorings - "Move Type to Namespace" incorrectly processes partial classes with nested xml comments

created 8 years ago

There are a few issues with this refactoring that I hope this example sums it all.

outer.cs

C#
namespace PauloMoegado.Something { using System; /// <summary> /// Class Outer. /// </summary> public partial class Outer { public DateTime D { get; set; } } }

outer.inner.cs

C#
namespnamespace PauloMoegado.Something { using System; using System.Collections.Generic; /// <summary> /// Class Outer. /// </summary> public partial class Outer { /// <summary> /// Class Inner. /// </summary> private class Inner { public List<DateTime> L { get; set; } } } }

If I move Outer to PauloMorgado.SomethingElse, I get this:

outer.cs

C#
namespace PauloMoegado.Something { using System; /// <summary> /// Class Outer. /// </summary> } namespace PauloMorgado.SomethingElse { /// <summary> /// Class Outer. /// </summary> public partial class Outer { public DateTime D { get; set; } } }

outer.inner.cs

C#
namespace PauloMoegado.Something { using System; using System.Collections.Generic; /// <summary> /// Class Outer. /// </summary> }

outer1.cs

C#
namespace PauloMorgado.SomethingElse { /// <summary> /// Class Outer. /// </summary> public partial class Outer { /// <summary> /// Class Inner. /// </summary> private class Inner { public List<DateTime> L { get; set; } } } }

Which does not compile.

The expected result, on these files, was just the namespace declaration change and no other files added.

Comments (1)
DevExpress Support Team 8 years ago

    Hi Paulo,
    thank you for your code snippets. I have reproduced the problem and recorded a screencast.
    We will try to fix the problem as soon as possible, and notify you about fixing it in this ticket.

    Answers approved by DevExpress Support

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