Exemplo n.º 1
0
        // Overload - operator to add two TrafficMonitor objects.
        public static TrafficMonitor operator-(TrafficMonitor FromNode, TrafficMonitor ToNode)
        {
            TrafficMonitor Result = new TrafficMonitor();

            Result.UD = FromNode.UD - ToNode.UD;
            Result.UL = FromNode.UL - ToNode.UL;
            Result.UR = FromNode.UR - ToNode.UR;
            Result.UU = FromNode.UU - ToNode.UU;

            Result.RD = FromNode.RD - ToNode.RD;
            Result.RL = FromNode.RL - ToNode.RL;
            Result.RR = FromNode.RR - ToNode.RR;
            Result.RU = FromNode.RU - ToNode.RU;

            Result.DD = FromNode.DD - ToNode.DD;
            Result.DL = FromNode.DL - ToNode.DL;
            Result.DR = FromNode.DR - ToNode.DR;
            Result.DU = FromNode.DU - ToNode.DU;

            Result.LD = FromNode.LD - ToNode.LD;
            Result.LL = FromNode.LL - ToNode.LL;
            Result.LR = FromNode.LR - ToNode.LR;
            Result.LU = FromNode.LU - ToNode.LU;

            return(Result);
        }
Exemplo n.º 2
0
        public TrafficMonitor Copy()
        {
            TrafficMonitor Result = new TrafficMonitor();

            Result.UD = this.UD;
            Result.UL = this.UL;
            Result.UR = this.UR;
            Result.UU = this.UU;
            Result.RD = this.RD;
            Result.RL = this.RL;
            Result.RR = this.RR;
            Result.RU = this.RU;
            Result.DD = this.DD;
            Result.DL = this.DL;
            Result.DR = this.DR;
            Result.DU = this.DU;
            Result.LD = this.LD;
            Result.LL = this.LL;
            Result.LR = this.LR;
            Result.LU = this.LU;

            return(Result);
        }