/// <summary>
        /// Consolidated all of the resources in the collection into a <see cref="ConsolidatedResource"/>.
        /// </summary>
        /// <param name="resources"></param>
        /// <param name="group"></param>
        /// <param name="getResourceContent"></param>
        /// <param name="separator"></param>
        public static ICompiledResource Consolidate(this IEnumerable<IResource> resources, IResourceGroup group, Func<IResource, string> getResourceContent, string separator)
        {
            var contentStream = new MemoryStream();
            var writer = new StreamWriter(contentStream);
            resources.ConsolidateContentTo(writer, getResourceContent, separator);
            writer.Flush();

            return new ConsolidatedResource(group, resources.ToResourceCollection(), contentStream);
        }
 /// <summary>
 /// Writes the contents of all of the contained resources to the given <see cref="TextWriter"/>.
 /// </summary>
 /// <param name="resources"></param>
 /// <param name="writer"></param>
 /// <param name="getResourceContent"></param>
 public static void ConsolidateContentTo(this IEnumerable<IResource> resources, TextWriter writer, Func<IResource, string> getResourceContent)
 {
     resources.ConsolidateContentTo(writer, getResourceContent, null);
 }
 /// <summary>
 /// Writes the contents of all of the contained resources to the given <see cref="TextWriter"/>.
 /// </summary>
 /// <param name="writer"></param>
 /// <param name="separator">A string that will be between each resource.</param>
 /// <param name="resources"></param>
 public static void ConsolidateContentTo(this IEnumerable<IResource> resources, TextWriter writer, string separator)
 {
     resources.ConsolidateContentTo(writer, null, separator);
 }
 /// <summary>
 /// Writes the contents of all of the contained resources to the given <see cref="TextWriter"/>.
 /// </summary>
 public static void ConsolidateContentTo(this IEnumerable<IResource> resources, TextWriter writer)
 {
     resources.ConsolidateContentTo(writer, String.Empty);
 }