Example #1
0
 /// <summary>
 ///     Execute the specified pipeline stage with pre-processing and post-processing.
 /// </summary>
 /// <param name="stage">The pipeline stage.</param>
 /// <param name="func">The stage function.</param>
 /// <param name="targets">The target list of the stage.</param>
 /// <param name="context">The working context.</param>
 // Token: 0x060002FD RID: 765 RVA: 0x0001298C File Offset: 0x00010B8C
 internal void ExecuteStage(PipelineStage stage, Action <ConfuserContext> func, Func <IList <IDnlibDef> > targets, ConfuserContext context)
 {
     foreach (ProtectionPhase pre in this.preStage[stage])
     {
         context.CheckCancellation();
         context.Logger.DebugFormat("Executing '{0}' phase...", new object[]
         {
             pre.Name
         });
         pre.Execute(context, new ProtectionParameters(pre.Parent, ProtectionPipeline.Filter(context, targets(), pre)));
     }
     context.CheckCancellation();
     func(context);
     context.CheckCancellation();
     foreach (ProtectionPhase post in this.postStage[stage])
     {
         context.Logger.DebugFormat("Executing '{0}' phase...", new object[]
         {
             post.Name
         });
         post.Execute(context, new ProtectionParameters(post.Parent, ProtectionPipeline.Filter(context, targets(), post)));
         context.CheckCancellation();
     }
 }