Beispiel #1
0
 /// <summary>
 /// 数据状态检测
 /// </summary>
 /// <typeparam name="TData"></typeparam>
 /// <param name="data"></param>
 /// <param name="entityType"></param>
 /// <param name="cmd"></param>
 /// <param name="userId"></param>
 public static void OnDataChanged(TData data, int entityType, BusinessCommandType cmd, int userId)
 {
     if (data == null)
     {
         return;
     }
     Task.Factory.StartNew(() =>
     {
         var trigger = new UserJobTrigger <TData>
         {
             TriggerUserId     = userId,
             TriggerData       = data,
             TriggerEntityType = entityType,
             TriggerCommand    = cmd
         };
         trigger.OnTrigger();
     });
 }
 /// <summary>
 ///     内部命令执行完成后的处理(unityStateChanged不设置为true时不会产生作用--基于性能的考虑)
 /// </summary>
 /// <param name="data">数据</param>
 /// <param name="cmd">命令</param>
 protected override void OnInnerCommand(TData data, BusinessCommandType cmd)
 {
     UserJobTrigger <TData> .OnDataChanged(data, EntityType, cmd, BusinessContext.Current.LoginUserId);
 }