Ejemplo n.º 1
0
 public void ResetState()
 {
     lock (dbLock)
     {
         db = new SagletModel();
     }
     hubDetails = new RoomDetailsHub();
     hubIndex   = new RoomIndexHub();
 }
Ejemplo n.º 2
0
        //return the tag for a message and the room solution
        internal static List <CriticalMsgPoints> Analyze(VMsg msg, RoomDetailsHub hubDetails)
        {
            List <CriticalMsgPoints> cps = new List <CriticalMsgPoints>();

            CriticalMsgPoints cp = new CriticalMsgPoints();

            cp.GroupID  = msg.GroupID;
            cp.MsgID    = msg.ID;
            cp.Priority = priority[i++ % priority.Length];

            string cpReply = GetCriticalPoint(msg.GroupID, msg.Text);

            string[] splitReply = cpReply.Split(',');

            if (splitReply[0].CompareTo("DS") == 0)
            {
                if (splitReply[1].CompareTo("0") == 0)
                {
                    cp.Type = CriticalPointTypes.WDS;
                }
                else if (splitReply[1].CompareTo("1") == 0)
                {
                    cp.Type = CriticalPointTypes.CDS;
                }
                else
                {
                    cp.Type = CriticalPointTypes.DS;
                }
            }
            else if (splitReply[0].CompareTo("TEC") == 0)
            {
                cp.Type = CriticalPointTypes.TEC;
            }
            else if (splitReply[0].CompareTo("NMD") == 0)
            {
                cp.Type = CriticalPointTypes.NMD;
            }
            else
            {
                cp.Type = CriticalPointTypes.None;
            }

            cps.Add(cp);

            return(cps);
        }