internal static bool MustMinify(IResourceElementGroupConfiguration resourceElementGroupConfiguration, ResourceElement resourceElement) { return (resourceElement.Minify.HasValue && resourceElement.Minify.Value) || (!resourceElement.Minify.HasValue && resourceElementGroupConfiguration.Minify); }
internal string MinifyAndCombineResources(IResourceElementGroupConfiguration resourceElementGroupConfiguration, ResourceType resourceType, IList<ResourceReadInfo> resources) { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < resources.Count; i++) { ResourceReadInfo resource = resources[i]; string content = MustMinify(resourceElementGroupConfiguration, resource.ResourceElement) ? MinifyContent(resourceType, resource.ResourceInfo.Content) : resource.ResourceInfo.Content; stringBuilder.Append(content); } return stringBuilder.ToString(); }