/Community

A Support Community for SubMain Products
in Search
Welcome to SubMain Community Sign in | Join | Help

Encapsulation

Last post 07-21-2005, 6:04 PM by Serge B.. 2 replies.
Sort Posts: Previous Next
  •  07-19-2005, 4:58 AM 65

    Encapsulation

    I am using beta version of code it once. It has many features, which I have not explored so far.

    I am just using code it once to encapsulate a field.

    When I do this, code it once changes all the instance of the variable to property, which is sometimes annoying.

    For example if I am creating a read only property, I might the use the variable to hold the value and use the property to provide value for callers outside the residing class.

    In this case I have to go and rename all property back to variable name.

    This is a suggestion and not a bug.
  •  07-21-2005, 6:02 PM 68 in reply to 65

    Encapsulation

    Hi Muthu,

    If you are using Wizard for the Encapsulate Field refactoring you can uncheck the "Update references in immediately enclosing type" option on Step 5 (Local references)

    There is even more flexibility - if you leave the above mentioned option checked, on Step 6 (Preview reference changes) you can pick and choose which one of the references you want changed.
    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
  •  07-21-2005, 6:04 PM 69 in reply to 68

    Encapsulation

    If you don't use the Wizard you get the same "Update references in immediately enclosing type" option and Preview button which is similar to "Preview reference changes" in the Wizard.
    Thank you,
    Serge Baranovsky
    http://submain.com - .NET Developer Tools  |  Microsoft VB MVP  |  http://vbcity.com - VB Developer Community
    » » (Static Code Analysis + Automatic Refactoring) / Painless Coding Guidelines = CodeIt.Right - http://submain.com/codeit.right
    » » C#/VB .NET Coding Guidelines - FREE 100+ page ebook (PDF) http://submain.com/guidelines
View as RSS news feed in XML