コード例 #1
0
 /// <summary>
 /// 添加 SQL 队列任务
 /// </summary>
 /// <param name="action">任务执行委托</param>
 /// <param name="parameter">参数</param>
 public static void AddQueueTask <parameterType>(Action <parameterType> action, ref parameterType parameter)
 {
     if (action != null)
     {
         DomainUnloadTransaction <parameterType> value = new DomainUnloadTransaction <parameterType> {
             Action = action, Parameter = parameter
         };
         if (AutoCSer.DomainUnload.Unloader.TransactionStart(true))
         {
             value.AddQueueTaskLinkThread();
         }
         throw new InvalidOperationException();
     }
 }
コード例 #2
0
 /// <summary>
 /// 添加任务
 /// </summary>
 /// <param name="action"></param>
 public static void AddTask(Action action)
 {
     if (action != null)
     {
         DomainUnloadTransaction value = new DomainUnloadTransaction {
             action = action
         };
         if (AutoCSer.DomainUnload.Unloader.TransactionStart(true))
         {
             new Task(value.run).Start();
         }
         throw new InvalidOperationException();
     }
 }
コード例 #3
0
 /// <summary>
 /// 添加 SQL 队列任务
 /// </summary>
 /// <param name="action"></param>
 public static void AddQueueTask(Action action)
 {
     if (action != null)
     {
         DomainUnloadTransaction value = new DomainUnloadTransaction {
             action = action
         };
         if (AutoCSer.DomainUnload.Unloader.TransactionStart(true))
         {
             value.AddQueueTaskLinkThread();
         }
         throw new InvalidOperationException();
     }
 }