コード例 #1
0
 /// <summary>
 /// Gets the task that executes the actions of a target.
 /// </summary>
 /// <param name="context"></param>
 /// <param name="target"></param>
 /// <param name="cancellationToken"></param>
 /// <returns></returns>
 Task GetExecuteTaskAsync(SqlDeploymentExecuteContext context, SqlDeploymentPlanTarget target, CancellationToken cancellationToken)
 {
     return(ExecuteAsync(context, target.Actions, cancellationToken));
 }
コード例 #2
0
        /// <summary>
        /// Executes the given target.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="target"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        async Task ExecuteAsync(SqlDeploymentExecuteContext context, SqlDeploymentPlanTarget target, CancellationToken cancellationToken)
        {
            await Task.WhenAll(target.DependsOn.Select(i => ExecuteAsync(context, i, cancellationToken)));

            await GetExecuteTaskAsync(context, target, cancellationToken);
        }