/// <summary> /// Combines the content of the CSS files. /// </summary> /// <param name="combiner">The combiner.</param> /// <returns></returns> private string CombineCssFileContent(CombinerConfig combiner) { var resolver = new CssRelativeUrlResolver(AppDomain.CurrentDomain.BaseDirectory, new Uri(EngineContext.ApplicationPath + "/", UriKind.Relative)); PostProcessScript postProcess = resolver.Resolve; return(CombineFileContent(combiner.CssFiles, postProcess)); }
/// <summary> /// Combines the content of the file. /// </summary> /// <param name="files">The files.</param> /// <param name="postProcess">The post process.</param> /// <returns></returns> private static string CombineFileContent(ICollection <string> files, PostProcessScript postProcess) { var sb = new StringBuilder(1024 * files.Count); foreach (var file in files) { using (var reader = File.OpenText(file)) { var line = reader.ReadToEnd(); line = postProcess.Invoke(file, line); sb.Append(line); } sb.AppendLine(); } return(sb.ToString()); }
void Start() { _postProcessRenderer = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PostProcessScript>(); _postProcessRenderer.AddToRenderList(this); }
/// <summary> /// Combines the content of the file. /// </summary> /// <param name="files">The files.</param> /// <param name="postProcess">The post process.</param> /// <returns></returns> private static string CombineFileContent(ICollection<string> files, PostProcessScript postProcess) { var sb = new StringBuilder(1024 * files.Count); foreach (var file in files) { using (var reader = File.OpenText(file)) { var line = reader.ReadToEnd(); line = postProcess.Invoke(file, line); sb.Append(line); } sb.AppendLine(); } return sb.ToString(); }
void Start() { _postProcessRenderer = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PostProcessScript>(); _postProcessRenderer.AddToRenderList(this); }