Skip to content
Browse files

fixed formatting

  • Loading branch information...
1 parent 5391f7f commit ca5f49b08ca59f5804c128aeb28ca8ff1e310bdd @phillip-haydon phillip-haydon committed Aug 13, 2012
Showing with 21 additions and 22 deletions.
  1. +21 −22 NuGet/content/Mvc.Bundler.cs
View
43 NuGet/content/Mvc.Bundler.cs
@@ -253,38 +253,37 @@ public static MvcHtmlString RenderJsBundle(this HtmlHelper html, string bundlePa
}
public static MvcHtmlString RenderCssBundle(this HtmlHelper html, string bundlePath, BundleOptions options = BundleOptions.Minified, string media = null)
- {
- if (string.IsNullOrEmpty(bundlePath))
- return MvcHtmlString.Empty;
+ {
+ if (string.IsNullOrEmpty(bundlePath))
+ return MvcHtmlString.Empty;
- if (!CachePaths()) BundleCache.SafeClear();
+ if (!CachePaths()) BundleCache.SafeClear();
- return BundleCache.GetOrAdd(bundlePath, str =>
- {
- var filePath = HostingEnvironment.MapPath(bundlePath);
+ return BundleCache.GetOrAdd(bundlePath, str => {
+ var filePath = HostingEnvironment.MapPath(bundlePath);
- var baseUrl = VirtualPathUtility.GetDirectory(bundlePath);
+ var baseUrl = VirtualPathUtility.GetDirectory(bundlePath);
- if (options == BundleOptions.Combined)
+ if (options == BundleOptions.Combined)
return html.Css(bundlePath.Replace(".bundle", ""), media, options);
- if (options == BundleOptions.MinifiedAndCombined)
+ if (options == BundleOptions.MinifiedAndCombined)
return html.Css(bundlePath.Replace(".css.bundle", ".min.css"), media, options);
- var cssFiles = File.ReadAllLines(filePath);
+ var cssFiles = File.ReadAllLines(filePath);
- var styles = new StringBuilder();
- foreach (var file in cssFiles)
- {
- var cssFile = file.Trim().Replace(".less", ".css");
- var cssSrc = Path.Combine(baseUrl, cssFile);
+ var styles = new StringBuilder();
+ foreach (var file in cssFiles)
+ {
+ var cssFile = file.Trim().Replace(".less", ".css");
+ var cssSrc = Path.Combine(baseUrl, cssFile);
- styles.AppendLine(
+ styles.AppendLine(
html.Css(cssSrc, media, options).ToString()
- );
- }
+ );
+ }
- return styles.ToString().ToMvcHtmlString();
- });
- }
+ return styles.ToString().ToMvcHtmlString();
+ });
+ }
}
}

0 comments on commit ca5f49b

Please sign in to comment.
Something went wrong with that request. Please try again.