예제 #1
0
 public void RaiseEvent(EventRequest request)
 {
     try
     {
         var user = UserInfoMaintenance.Instance[request.UserName];
         if (user != null && user.Token == request.UserToken)
         {
             var example = PageExampleMaintenance.Instance.GetPageExample(request);
             if (example != null)
             {
                 PageRaiseEventInvoker.Instance.Invoker(request);
             }
         }
     }
     catch (Exception ex)
     {
         PageLogger.RecordErrorLog("RaiseEvent", ex);
     }
 }
예제 #2
0
 private void InvokeEvent(EventRequest request)
 {
     var example = PageExampleMaintenance.Instance.GetPageExample(request);
     if (example != null)
     {
         var control = example.Evaluataion.PageControls.FirstOrDefault(c =>
             c.ControlId == request.ControlId);
         if (control != null)
         {
             var compiledEvent = control.Events.FirstOrDefault(e =>
                 e.Name == request.EventName && e.CompiledScript != null);
             if (compiledEvent != null)
             {
                 compiledEvent.EventParameter = request.EventParameter;
                 EngineUtility.ExecuteCompiledCode(compiledEvent.CompiledScript,
                     PageCompiledCodeContext.Instance);
             }
         }
     }
 }
예제 #3
0
 public void Invoker(EventRequest request)
 {
     m_InvokerPort.Post(request);
 }