Bug Report T607230
Visible to All Users

Region Auto Create - #region is misplaced under certain circumstances

created 7 years ago

Hello, region created by CodeRush is miplaced:
Original code:

C#
public class CasErPlusDialog06NawiScale : SingleReadNawiScaleBase, ISetUnitPriceNawiScale { #region private constants... private const int _decimals = 3; #endregion #region private fields... private readonly SerialDeviceSettings _deviceSettings; #endregion #region constructors... public CasErPlusDialog06NawiScale(SerialDeviceSettings deviceSettings) { _deviceSettings = deviceSettings; } #endregion public void SetUnitPrice(decimal unitPrice) { throw new NotImplementedException(); } }

Then I set cursor to public void SetUnitPrice and press Ctrl+3. I get this code:

C#
public class CasErPlusDialog06NawiScale : SingleReadNawiScaleBase, ISetUnitPriceNawiScale { #region private constants... private const int _decimals = 3; #endregion #region private fields... private readonly SerialDeviceSettings _deviceSettings; #endregion #region constructors... public CasErPlusDialog06NawiScale(SerialDeviceSettings deviceSettings) { _deviceSettings = deviceSettings; } #region SetUnitPrice #endregion public void SetUnitPrice(decimal unitPrice) { throw new NotImplementedException(); } #endregion }

As you see, the region #region SetUnitPrice is placed incorrectly (overlapped with region constructors).

Comments (1)
DevExpress Support Team 7 years ago

    Hi Karel,

    Thank you for the provided code sample. It allowed me to reproduce the issue on my side.
    I've passed it to our R&D team for research. Once we get any results, we will update this ticket.

    Regards,
    Igor

    Answers approved by DevExpress Support

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