/// <summary>Initializes a new instance of the <see cref="WebGreaseConfiguration"/> class.</summary> /// <param name="configuration">The configuration.</param> internal WebGreaseConfiguration(WebGreaseConfiguration configuration) : this(configuration.ConfigType, configuration.SourceDirectory, configuration.DestinationDirectory, configuration.LogsDirectory, configuration.ToolsTempDirectory, configuration.ApplicationRootDirectory, configuration.PreprocessingPluginPath) { this.CacheEnabled = configuration.CacheEnabled; this.CacheRootPath = configuration.CacheRootPath; this.CacheTimeout = configuration.CacheTimeout; this.CacheUniqueKey = configuration.CacheUniqueKey; this.Measure = configuration.Measure; this.Overrides = configuration.Overrides; this.ReportPath = configuration.ReportPath; }
/// <summary>Initializes with the values from the constructor and returns the filesets.</summary> /// <param name="fileSetElement">The file set element.</param> /// <param name="globalConfig">The global config.</param> /// <param name="configurationFile">The configuration file.</param> /// <returns>The list of filesets</returns> protected IEnumerable <XElement> Initialize(XElement fileSetElement, GlobalConfig globalConfig, string configurationFile) { var outputAttribute = fileSetElement.Attribute("output"); this.Output = (string)outputAttribute ?? string.Empty; this.GlobalConfig = globalConfig; var fileSetElements = fileSetElement.Descendants().ToList(); WebGreaseConfiguration.ForEachConfigSourceElement( fileSetElement, configurationFile, (element, s) => { this.LoadedConfigurationFiles.Add(s); fileSetElements.AddRange(element.Descendants()); }); return(fileSetElements); }