public void Process(BundleContext context, BundleResponse response)
{
HttpContext.Current.Response.Cache.SetLastModifiedFromFileDependencies();
foreach (Match match in Url.Matches(response.Content))
{
var filename = HostingEnvironment.MapPath(match.Groups[2].Value);
if (filename != null)
{
var file = new FileInfo(filename);
if (file.Exists)
{
string dataUri = this.GetDataUri(file);
response.Content = response.Content.Replace(match.Value, dataUri);
HttpContext.Current.Response.AddFileDependency(file.FullName);
}
}
}
}