microsoft / XamlBehaviors

This is the official home for UWP XAML Behaviors on GitHub.
MIT License
697 stars 112 forks source link

rename private member variables to have an underscore prefix #141

Closed skendrot closed 5 years ago

skendrot commented 5 years ago

As discussed in #139, this renames all private member variables to include an underscore prefix. This will help prevent mistakes as to which variable is being used.

NOTE: This does not remove the this. prefix from the use of those variables or any other used of the this. prefix.

NOTE: The contributing wiki will need to be updated once this is merged

LocalJoost commented 5 years ago

Me too. Be careful though with a simple search&replace 😉 I am not sure there are extensions methods in there and sometimes calling those require the this prefix

Joost van Schaik

Windows Development MVP Sent from mail for Windows 10

"The world as I envision it in my head is such a more interesting place"


From: Pedro Lamas notifications@github.com Sent: Monday, November 5, 2018 5:22:00 PM To: Microsoft/XamlBehaviors Cc: Subscribed Subject: Re: [Microsoft/XamlBehaviors] rename private member variables to have an underscore prefix (#141)

@PedroLamas commented on this pull request.


In src/BehaviorsSDKManaged/ManagedUnitTests/TestVisualTreeHelper.cshttps://github.com/Microsoft/XamlBehaviors/pull/141#discussion_r230814860:

public void AddChild(DependencyObject parent, DependencyObject child) {

  • this.parents[child] = parent;
  • this._parents[child] = parent;

I second the "no more .this" motion! 🙂

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/XamlBehaviors/pull/141#discussion_r230814860, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD8BnzsSf5sZWuLY6Uiw9w7sMKJG_mWeks5usGWogaJpZM4YMV-u.

pedrolamas commented 5 years ago

This looks good to me, if anyone opposes merging, speak now or forever hold thy peace because I'm about to press the button... after merging this, we can then focus on removing the this. prefix and updating the wiki.