Exemple #1
0
 /// <summary>
 /// 获取单例
 /// </summary>
 /// <returns></returns>
 private static EventControl GetInstance()
 {
     if (instance != null)
     {
         return(instance);
     }
     instance = new EventControl();
     return(instance);
 }
Exemple #2
0
        public override void OnWIN(HttpRequest request, HttpResponse response)
        {
            string jsonStr = request.Body;

            WinjsLib.Message ms = JsonConvert.DeserializeObject <WinjsLib.Message>(jsonStr);
            ms.Json     = jsonStr;
            ms.Request  = request;
            ms.Response = response;
            //MsgQueue.getInstance().handle(MsgQueue.PUSH, ms);
            if (EventControl.HasEvent(ms.EventName))
            {
                EventControl.GetEvent(ms.EventName)(ms);
            }
        }