Task class definition.
Inheritance: ITask
Esempio n. 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)
 {
 }
Esempio n. 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)
 {
 }
Esempio n. 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)
 {
 }
Esempio n. 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)
 {
 }
Esempio n. 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)
 {
 }
Esempio n. 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)
 {
 }
Esempio n. 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)
 {
 }