Пример #1
0
        /// <summary>
        /// Executes the source code compilation unit with a strategic sequential pattern. 
        /// </summary>
        /// <param name="context">
        /// The execution context state.
        /// </param>
        /// <param name="requirement">
        /// The requirement.
        /// </param>
        public void Execute(ExecutionContext context, FlowRequirement requirement)
        {
            // Invokes the action on flow requirements.
            if (!context.LastExecutionResult.HasError)
            {
                context.LastExecutionResult = requirement.CompileOperation.Invoke(requirement.SourceCode);
            }

            if (this.successor != null)
            {
                this.successor.Execute(context, requirement);
            }
        }
 /// <summary>
 /// The execute.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 /// <param name="requirement">
 /// The requirement.
 /// </param>
 public void Execute(ExecutionContext context, FlowRequirement requirement)
 {
     try
     {
          this.successor.Execute(context, requirement);
     }
     catch (Exception exception)
     {
         context.LastExecutionResult = new ExecutionResult
                                           {
                                               ErrorDescription =
                                                   string.Format(
                                                       "An exception occurred during execution. {0}",
                                                       exception.Message)
                                           };
         this.exceptionHandler(exception);
     }
 }
 /// <summary>
 /// Executes the source code compilation unit with a strategic sequential pattern. 
 /// </summary>
 /// <param name="context">
 /// The execution context state.
 /// </param>
 /// <param name="requirement">
 /// The requirement.
 /// </param>
 public void Execute(ExecutionContext context, FlowRequirement requirement)
 {
     // TODO: Find the Test assembly from database and load it.
     this.successor.Execute(context, requirement);
 }
 /// <summary>
 /// Executes the source code compilation unit with a strategic sequential pattern. 
 /// </summary>
 /// <param name="context">
 /// The execution context state.
 /// </param>
 /// <param name="requirement">
 /// The requirement.
 /// </param>
 public void Execute(ExecutionContext context, FlowRequirement requirement)
 {
     // TODO: Find the compilation unit from service locator and attach the compile function to the requirement
     this.successor.Execute(context, requirement);
 }