/// <summary> /// 获取单例 /// </summary> /// <returns></returns> private static EventControl GetInstance() { if (instance != null) { return(instance); } instance = new EventControl(); return(instance); }
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); } }