Task class definition.
Наследование: ITask
Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceScope"/> class.
 /// </summary>
 /// <param name="decoratedTask">Wrapped task.</param>
 /// <param name="resources">Sequence of resources to dispose of.</param>
 public ResourceScope(ITask decoratedTask, params IDisposable[] resources)
     : this(TaskBase.NextTaskName(), decoratedTask, (IEnumerable <IDisposable>)resources)
 {
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceScope"/> class.
 /// </summary>
 /// <param name="decoratedTask">Wrapped task.</param>
 /// <param name="resources">Sequence of resources to dispose of.</param>
 public ResourceScope(ITask decoratedTask, IEnumerable <IDisposable> resources)
     : this(TaskBase.NextTaskName(), decoratedTask, resources)
 {
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExecuteSqlTask"/> class.
 /// </summary>
 /// <param name="connectionFactory">Connection factory.</param>
 /// <param name="commandText">Command to execute.</param>
 public ExecuteSqlTask(IDbConnectionFactory connectionFactory, string commandText)
     : this(TaskBase.NextTaskName(), connectionFactory, commandText)
 {
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExecuteProcessTask"/> class.
 /// </summary>
 /// <param name="startInfo">Information used to start the process including command-line parameters.</param>
 public ExecuteProcessTask(ProcessStartInfo startInfo)
     : this(TaskBase.NextTaskName(), startInfo)
 {
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActionTask"/> class.
 /// </summary>
 /// <param name="action">Action to call when the task executes.</param>
 public ActionTask(Action action)
     : this(TaskBase.NextTaskName(), action)
 {
 }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the CompositeTask class.
 /// </summary>
 /// <param name="tasks">A sequence of tasks.</param>
 protected CompositeTask(IEnumerable <ITask> tasks)
     : this(TaskBase.NextTaskName(), tasks)
 {
 }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncActionTask"/> class.
 /// </summary>
 /// <param name="action">Action to call when the task executes.</param>
 public AsyncActionTask(Func <Task> action)
     : this(TaskBase.NextTaskName(), action)
 {
 }