C# Class UCosmic.FileSizeExtensions

Mostrar archivo Open project: ucosmic/UCosmicAlpha

Public Methods

Method Description
ToAbbreviatedFileSize ( this lengthInBytes, int maxPrecision = 2, FileSizeUnitAbbreviation fileSizeUnitAbbreviation = null ) : string
ToFileSize ( this lengthInBytes, int maxPrecision = 2, FileSizeUnitName fileSizeUnitName = null ) : string

Private Methods

Method Description
ConvertBytesTo ( this lengthInBytes, FileSizeUnitAbbreviation unitAbbreviation ) : decimal
ConvertBytesTo ( this lengthInBytes, FileSizeUnitName unitName ) : decimal
GetPrecision ( this size, int maxPrecision ) : int
GetSizeFormat ( this precision ) : string
GetSmartUnitAbbreviation ( this lengthInBytes ) : FileSizeUnitAbbreviation
GetSmartUnitName ( this lengthInBytes ) : FileSizeUnitName
GetUnitText ( this unit, string sizeText ) : string

Method Details

ToAbbreviatedFileSize() public static method

public static ToAbbreviatedFileSize ( this lengthInBytes, int maxPrecision = 2, FileSizeUnitAbbreviation fileSizeUnitAbbreviation = null ) : string
lengthInBytes this
maxPrecision int
fileSizeUnitAbbreviation FileSizeUnitAbbreviation
return string

ToFileSize() public static method

public static ToFileSize ( this lengthInBytes, int maxPrecision = 2, FileSizeUnitName fileSizeUnitName = null ) : string
lengthInBytes this
maxPrecision int
fileSizeUnitName FileSizeUnitName
return string