Bundling.Extensions.Transforms.CssInlineImagesTransform.Process C# (CSharp) Метод

Process() публичный Метод

public Process ( BundleContext context, BundleResponse response ) : void
context BundleContext
response BundleResponse
Результат void
		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);
					}
				}
			}
		}
CssInlineImagesTransform