Ejemplo n.º 1
0
        /// <summary>
        /// Executes the preprocessing process.
        /// </summary>
        /// <param name="context">The compilation context.</param>
        public void Execute(CompilationContext context)
        {
            if (context == null || context.Compilation == null)
                return;

            // get local imports
            var provider = new ImportProvider<IPreprocessor>(null);
            var sorter = new PreprocessorSorter();

            foreach (var preprocessor in sorter.Sort(provider.GetImports()))
            {
                context.Compilation = preprocessor.ProcessCompilation(context.Compilation);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Executes the preprocessing process.
        /// </summary>
        /// <param name="context">The compilation context.</param>
        public void Execute(CompilationContext context)
        {
            if (context == null || context.Compilation == null)
            {
                return;
            }

            // get local imports
            var provider = new ImportProvider <IPreprocessor>(null);
            var sorter   = new PreprocessorSorter();

            foreach (var preprocessor in sorter.Sort(provider.GetImports()))
            {
                context.Compilation = preprocessor.ProcessCompilation(context.Compilation);
            }
        }