Exemplo n.º 1
0
        public void SetProperty(NetworkMeasureProperty prop, string val)
        {
            long dbVal = long.Parse(val);

            switch (prop)
            {
            case NetworkMeasureProperty.DownloadRate:
            case NetworkMeasureProperty.CurrentDownload:
            case NetworkMeasureProperty.CurrentUpload:
            case NetworkMeasureProperty.UploadRate:
            case NetworkMeasureProperty.TrafficMaxLimit:
                SetProperty(prop, Octet.FromOctet(dbVal));
                break;

            case NetworkMeasureProperty.StartDay:
                SetProperty(prop, Convert.ToInt32(dbVal));
                break;
            }
        }
Exemplo n.º 2
0
 public static Octet FromKilo(long kilo) => Octet.FromOctet(kilo * coef);
Exemplo n.º 3
0
 public static Octet operator /(Octet a, long b)
 {
     return(Octet.FromOctet(a.GetOctets() / b));
 }
Exemplo n.º 4
0
 public static Octet operator -(Octet a, Octet b)
 {
     return(Octet.FromOctet(a.GetOctets() - b.GetOctets()));
 }