Changeset 1592


Ignore:
Timestamp:
1/19/2010 2:51:56 AM (4 years ago)
Author:
lowjoel
Message:

Fixed CA1704 : Microsoft.Naming : Correct the spelling of 'Filesize' in member name 'File.GetHumanReadableFilesize?(long)' or remove it entirely if it represents any sort of Hungarian notation. GetHumanReadableFilesize? => GetHumanReadableFileSize?. In addition, sizes use the next larger unit the moment it exists 1000 (to minimise the number of significant figures in the result)

File:
1 edited

Legend:

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

    r1584 r1592  
    269269        /// <returns>A string containing the file size and the associated unit. 
    270270        /// Files larger than 1MB will be accurate to 2 decimal places.</returns> 
    271         public static string GetHumanReadableFilesize(long bytes) 
     271        public static string GetHumanReadableFileSize(long bytes) 
    272272        { 
    273273            //List of units, in ascending scale 
     
    285285            for (int i = 0; i != units.Length; ++i) 
    286286            { 
    287                 if (dBytes < 1020.0) 
     287                if (dBytes < 1000.0) 
    288288                    if (i <= 1) 
    289289                        return string.Format(CultureInfo.CurrentCulture, 
     
    318318        } 
    319319 
     320        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "1#")] 
     321        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "2#")] 
     322        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1021:AvoidOutParameters", MessageId = "3#")] 
    320323        public static void GetFileTime(SafeFileHandle file, out DateTime creationTime, 
    321324            out DateTime accessedTime, out DateTime modifiedTime) 
Note: See TracChangeset for help on using the changeset viewer.