Пример #1
0
        /// <summary>
        /// The DataSourcePlan has a set of PostProcessors, identified by fully-qualified
        /// assembly name.   If there is a readyToUseSubPlan, and it has postprocessors, it
        /// will add those first.
        /// <param name="readyToUseSubPlan">A ReadyToUsePlan (possibly null) they specify
        /// processors to be fired first.</param>       
        /// </summary>
        private void AcquirePostPostProcessors(IReadyToUseSubPlan readyToUseSubPlan)
        {
            PostProcessors = new List<IPostProcessor> ();
            try {

                // Get the processors from the ReadyToUseSubPlan first.
                if (readyToUseSubPlan != null &&
                    readyToUseSubPlan.PostProcessorDescriptors != null) {
                    foreach (var postProcessorDescriptor in
                        readyToUseSubPlan.PostProcessorDescriptors) {
                        InstantiatePostProcessor(postProcessorDescriptor);
                    }
                }

                // Now get the ones from the DataSourcePlan.
                if (Plan.PostProcessors != null) {
                    foreach (var postProcessorDescriptor in Plan.PostProcessors) {
                        InstantiatePostProcessor(postProcessorDescriptor);
                    }
                }
            } catch (Exception ex) {
                throw new Exception (
                    String.Format ("AcquirePostPostProcessors - error {0}", ex.Message), ex);
            }
        }
Пример #2
0
        /// <summary>
        /// PostProcess is the final stage of processing, where business rules are applied
        // against the data placed in staging by the Process() endpoint, and resultant rows
        // inserted, modified, and/or deleted at the final location.
        /// <param name="loadNum">The load number to perform post processing on.</param>
        /// <param name="readyToUseSubPlan">A ReadyToUseSubPlan (can be null) that may
        /// have additional PostProcessors to be run first.</param>
        /// </summary>
        public void PostProcess(int loadNum, IReadyToUseSubPlan readyToUseSubPlan)
        {
            if (!Plan.PostProcess) {
                return;
            }

            AcquirePostPostProcessors (readyToUseSubPlan);
            RunPostProcessors(loadNum, PostProcessors);
        }