コード例 #1
0
        public static Size toProper(TQuantity bytes)
        {
            EScale scale = EScale.B;

            for (; bytes > Base; ++scale)
            {
                bytes /= Base;
            }
            return(new Size(bytes, scale));
        }
コード例 #2
0
 public Size(TQuantity quantity, EScale scale = EScale.B)
 {
     Quantity = quantity;
     Scale    = scale;
 }
コード例 #3
0
 public static Size toYB(TQuantity bytes)
 {
     return(new Size(bytes /= YottaBase, EScale.YB));
 }
コード例 #4
0
 public static Size toZB(TQuantity bytes)
 {
     return(new Size(bytes /= ZettaBase, EScale.ZB));
 }
コード例 #5
0
 public static Size toEB(TQuantity bytes)
 {
     return(new Size(bytes /= ExaBase, EScale.EB));
 }
コード例 #6
0
 public static Size toPB(TQuantity bytes)
 {
     return(new Size(bytes /= PetaBase, EScale.PB));
 }
コード例 #7
0
 public static Size toTB(TQuantity bytes)
 {
     return(new Size(bytes /= TeraBase, EScale.TB));
 }
コード例 #8
0
 public static Size toGB(TQuantity bytes)
 {
     return(new Size(bytes /= GigaBase, EScale.GB));
 }
コード例 #9
0
 public static Size toMB(TQuantity bytes)
 {
     return(new Size(bytes /= MegaBase, EScale.MB));
 }
コード例 #10
0
 public static Size toKB(TQuantity bytes)
 {
     return(new Size(bytes /= KiloBase, EScale.KB));
 }