@@ -60,13 +60,13 @@ public static string WithEnding(this string str, string ending)
60
60
61
61
private static readonly Dictionary < string , string > abbreviations = new ( )
62
62
{
63
- { "KiB" , " KiloByteSymbol" . GetLocalizedResource ( ) } ,
64
- { "MiB" , " MegaByteSymbol" . GetLocalizedResource ( ) } ,
65
- { "GiB" , " GigaByteSymbol" . GetLocalizedResource ( ) } ,
66
- { "TiB" , " TeraByteSymbol" . GetLocalizedResource ( ) } ,
67
- { "PiB" , " PetaByteSymbol" . GetLocalizedResource ( ) } ,
68
- { "B" , " ByteSymbol" . GetLocalizedResource ( ) } ,
69
- { "b" , " ByteSymbol" . GetLocalizedResource ( ) }
63
+ { ByteSize . KiloByteSymbol , Strings . KiloByteSymbol . GetLocalizedResource ( ) } ,
64
+ { ByteSize . MegaByteSymbol , Strings . MegaByteSymbol . GetLocalizedResource ( ) } ,
65
+ { ByteSize . GigaByteSymbol , Strings . GigaByteSymbol . GetLocalizedResource ( ) } ,
66
+ { ByteSize . TeraByteSymbol , Strings . TeraByteSymbol . GetLocalizedResource ( ) } ,
67
+ { ByteSize . PetaByteSymbol , Strings . PetaByteSymbol . GetLocalizedResource ( ) } ,
68
+ { ByteSize . BitSymbol , Strings . ByteSymbol . GetLocalizedResource ( ) } ,
69
+ { ByteSize . ByteSymbol , Strings . ByteSymbol . GetLocalizedResource ( ) }
70
70
} ;
71
71
72
72
public static string ConvertSizeAbbreviation ( this string value )
@@ -83,7 +83,7 @@ public static string ConvertSizeAbbreviation(this string value)
83
83
public static string ToSizeString ( this long size ) => ByteSize . FromBytes ( size ) . ToSizeString ( ) ;
84
84
public static string ToSizeString ( this ulong size ) => ByteSize . FromBytes ( size ) . ToSizeString ( ) ;
85
85
public static string ToSizeString ( this decimal size ) => ByteSize . FromBytes ( ( double ) size ) . ToSizeString ( ) ;
86
- public static string ToSizeString ( this ByteSize size ) => size . ToBinaryString ( ) . ConvertSizeAbbreviation ( ) ;
86
+ public static string ToSizeString ( this ByteSize size ) => size . ToString ( ) . ConvertSizeAbbreviation ( ) ;
87
87
88
88
public static string ToLongSizeString ( this long size ) => ByteSize . FromBytes ( size ) . ToLongSizeString ( ) ;
89
89
public static string ToLongSizeString ( this ulong size ) => ByteSize . FromBytes ( size ) . ToLongSizeString ( ) ;
0 commit comments