AssetPackager.ScriptsHandler.CombineScripts C# (CSharp) Method

CombineScripts() private static method

private static CombineScripts ( IEnumerable assets ) : object
assets IEnumerable
return object
		private static object CombineScripts(IEnumerable<Asset> assets)
		{
			StringBuilder buffer = new StringBuilder();
			foreach (Asset asset in assets)
				FetchScript(asset.RelativePath, buffer);

			string response = _notifyScriptRegex.Replace(buffer.ToString(), String.Empty);
			response += "\nif(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();";

			return HttpContext.Current.Request.ContentEncoding.GetBytes(response);
		}