private void HandleCallInfo(string message)
 {
     string[] parts = message.Split(new char[] { ',' }, 4);
     string desc = parts[1];
     int xhrId;
     bool hasXhrId = int.TryParse(parts[2], out xhrId);
     int itId;
     bool hasItId = int.TryParse(parts[3], out itId);
     if (hasXhrId)
     {
         m_ScriptPage.AddCallInfoAccessXhr(xhrId);
     }
     else if (hasItId)
     {
         if (desc.StartsWith("set-"))
         {
             IntervalTimeout it = new IntervalTimeout(desc == "set-interval");
             m_ScriptPage.AddCallInfoSetIntervalTimeout(itId, it);
         }
         else if (desc.StartsWith("clear-"))
         {
             m_ScriptPage.AddCallInfoClearIntervalTimeout(itId);
         }
         else
         {
             throw new ApplicationException("set- or clear- expected");
         }
     }
     else
     {
         throw new ApplicationException("Xhr/IT id expected");
     }
 }
예제 #2
0
 public Event(string name, IntervalTimeout it)
     : this(name, "")
 {
     IntervalTimeout = it;
 }