Ejemplo n.º 1
0
        private void DisposeManager()
        {
            foreach (CssGroupElement group in cssGroups)
            {
                CrushCssHelper.RemoveFiles(group.OutputFilePath);
            }

            foreach (JsGroupElement group in jsGroups)
            {
                CrushJsHelper.RemoveFiles(group.OutputFilePath);
            }

            if (AppDomain.CurrentDomain != null)
            {
                AppDomain.CurrentDomain.DomainUnload -= OnDomainUnload;
            }
        }
Ejemplo n.º 2
0
        private void InitManager()
        {
            AppDomain.CurrentDomain.DomainUnload += OnDomainUnload;

            foreach (CssGroupElement group in cssGroups)
            {
                var files      = new List <CssFile>();
                var outputPath = group.OutputFilePath;

                foreach (CssFileElement cssFile in group.Files)
                {
                    var file = new CssFile()
                    {
                        CompressionType = cssFile.CompressionType,
                        FilePath        = cssFile.FilePath
                    };
                    files.Add(file);
                }

                CrushCssHelper.AddFiles(outputPath, files);
            }

            foreach (JsGroupElement group in jsGroups)
            {
                var files      = new List <JsFile>();
                var outputPath = group.OutputFilePath;

                foreach (JsFileElement cssFile in group.Files)
                {
                    var file = new JsFile()
                    {
                        CompressionType = cssFile.CompressionType,
                        FilePath        = cssFile.FilePath
                    };
                    files.Add(file);
                }

                CrushJsHelper.AddFiles(outputPath, files);
            }
        }