Exemple #1
0
 /// <summary>
 /// 註冊Msg Function
 /// </summary>
 /// <param name="msgId"> 訊息編號 </param>
 /// <param name="func"> 對應的函式 </param>
 private void AddMsgFunc(int msgId, MsgFunction func)
 {
     if (!msgFuncList.ContainsKey(msgId))
     {
         msgFuncList.Add(msgId, func);
     }
 }
Exemple #2
0
 public CashlinxLoadThreadController(
     ProgressionRate pRate,
     uint delayUsers,
     uint maxThreads,
     double scale,
     uint numIters,
     LoadTestInputVO input,
     ThreadPriority priority,
     ExecuteFlow scen,
     MsgFunction mFunc,
     StreamWriter fOutput)
 {
     this.rate = pRate;
     this.delayBetweenUsers = delayUsers;
     this.maxNumberThreads  = maxThreads;
     this.threadRateList    = new List <uint>();
     this.threadList        = new List <Thread>();
     this.threadPriority    = priority;
     this.progressionScale  = scale;
     this.numberIterations  = numIters;
     this.flowToExecute     = scen;
     this.threadInput       = input;
     this.msgFunction       = mFunc;
     if (this.progressionScale < 0.0d)
     {
         this.progressionScale *= -1.0d;
     }
     this.genThreadRateList();
     this.prepareThreads();
     this.fullyComplete = false;
     this.curIteration  = 0;
     this.timings       = new Dictionary <int, List <TupleType <int, string, double> > >();
     this.fileOutput    = fOutput;
     this.fileOutput.WriteLine("Iteration,  ThreadID  ,  Area  , Duration (seconds) ");
 }
Exemple #3
0
        public ActionResult Send(Msg msg)
        {
            MsgFunction msgFunction = new MsgFunction();

            List <Results> getres = msgFunction.sendSms(msg);

            return(View("Results", getres));
        }
        public List <Results> send(string phonenumber, string content)
        {
            MsgFunction msgFunction = new MsgFunction();
            Msg         msg         = new Msg();

            msg.phonenumber = phonenumber;
            msg.content     = content;

            List <Results> getres = msgFunction.sendSms(msg);

            return(getres);
        }
        public string updateInfo(string MessageSid, string MessageStatus)
        {
            MsgFunction msgfunc = new MsgFunction();

            if (msgfunc.updateSmsInfo(MessageSid, MessageStatus))
            {
                return("success");
            }
            else
            {
                return("fail");
            }
        }
Exemple #6
0
 public KmlIO(MsgFunction msg)
 {
     this.msgToExtern = msg;
 }