예제 #1
0
        /// <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);
        }