Changeset 1770


Ignore:
Timestamp:
2/8/2010 7:41:24 AM (2 years ago)
Author:
lowjoel
Message:

Marked disposable classes' Dispose(bool) member protected virtual; or private and sealed the class if the class is not meant to be inherited. Addresses #275: Code Review

Location:
branches/eraser6/CodeReview
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/CodeReview/Eraser.Util/ConsoleWindow.cs

    r1600 r1770  
    3030    /// object. 
    3131    /// </summary> 
    32     public class ConsoleWindow : IDisposable 
     32    public sealed class ConsoleWindow : IDisposable 
    3333    { 
    3434        public ConsoleWindow() 
  • branches/eraser6/CodeReview/Eraser.Util/Security.cs

    r1745 r1770  
    146146        } 
    147147 
    148         public void Dispose(bool disposing) 
     148        private void Dispose(bool disposing) 
    149149        { 
    150150            if (disposing) 
  • branches/eraser6/CodeReview/Eraser.Util/VolumeInfo.cs

    r1745 r1770  
    716716    } 
    717717 
    718     public class VolumeLock : IDisposable 
     718    public sealed class VolumeLock : IDisposable 
    719719    { 
    720720        internal VolumeLock(FileStream stream) 
     
    745745 
    746746        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "disposing")] 
    747         void Dispose(bool disposing) 
     747        private void Dispose(bool disposing) 
    748748        { 
    749749            //Flush the contents of the buffer to disk since after we unlock the volume 
  • branches/eraser6/CodeReview/Eraser/Program.ConsoleProgram.cs

    r1580 r1770  
    7272            } 
    7373 
    74             public void Dispose(bool disposing) 
     74            protected virtual void Dispose(bool disposing) 
    7575            { 
    7676                //Flush the buffered output to the console 
  • branches/eraser6/CodeReview/Eraser/Settings.cs

    r1768 r1770  
    4040        /// Registry-based storage backing for the Settings class. 
    4141        /// </summary> 
    42         private class RegistrySettings : Manager.Settings, IDisposable 
     42        private sealed class RegistrySettings : Manager.Settings, IDisposable 
    4343        { 
    4444            /// <summary> 
Note: See TracChangeset for help on using the changeset viewer.