Exemple #1
0
        private string GenerateCss(string import, BundleContext context)
        {
            var configuration = new WebConfigConfigurationLoader().GetConfiguration();
            configuration.DisableParameters = true;

            var logger = new InMemoryLogger(configuration.LogLevel);
            var engine = new EngineFactory(configuration).GetEngine(CreateContainer(context, logger));
            var cssOutput = engine.TransformToCss(import, context.BundleVirtualPath);
            if (!engine.LastTransformationSuccessful)
            {
                return logger.GetOutput();
            }

            return cssOutput;
        }
Exemple #2
0
 private BundlingContainerFactory CreateContainer(BundleContext context, InMemoryLogger logger)
 {
     return new BundlingContainerFactory(context.HttpContext, logger, BundleTable.VirtualPathProvider);
 }