2 comments
Comment actions Permalink

Hello Eyal,

I've checked this pattern and it removes any region around type members when
I run code cleanup with 'Full Cleanup' profile. Which code cleanup profile
do you use? Could you please attach a small sample demonstrating a piece
of code where ReSharper doens't remove regions? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I've attached the Type Members Layout I use.

---
Original message URL:
http://devnet.jetbrains.net/message/5424550#5424550



0
Comment actions Permalink

Try something that has preprocessor directives in it.

namespace Eyal.MVVM.Demo
{
     using System;
     using System.ComponentModel;
     using System.Diagnostics;

     public abstract class ViewModelBase : INotifyPropertyChanged, IDisposable
     {
          public virtual string DisplayName { get; protected set; }

          #region INotifyPropertyChanged Members

          public event PropertyChangedEventHandler PropertyChanged;

          protected virtual void OnPropertyChanged(string propertyName)
          {
               PropertyChangedEventHandler handler = PropertyChanged;

               if (handler != null)
               {
                    var e = new PropertyChangedEventArgs(propertyName);

                    handler(this, e);
               }
          }

          #endregion

          #region IDisposable Members

          public virtual void Dispose()
          {
          }

          #endregion

#if DEBUG
          ~ViewModelBase()
          {
               string msg = string.Format("Finalize: {0} ({1})", GetType().FullName, DisplayName);

               Debug.WriteLine(msg);
          }
#endif
     }
}

0

Please sign in to leave a comment.