public void AddPageAfterHtmlCodeIfNotExists(string pageJsName) { if (!FootCodes.ContainsKey(pageJsName)) { FootCodes.Add(pageJsName, GetJsCode(pageJsName)); } }
public async Task AddPageAfterHtmlCodeIfNotExistsAsync(string pageJsName) { if (!FootCodes.ContainsKey(pageJsName)) { FootCodes.Add(pageJsName, await GetJsCodeAsync(pageJsName)); } }
/// <summary> /// 将一个页面的js复制给本页面,提供给分页时使用 /// add by sessionliang at 20151209 /// </summary> /// <param name="lastPageInfo"></param> public void AddLastPageScript(PageInfo lastPageInfo) { foreach (var key in lastPageInfo.BodyCodes.Keys) { if (!BodyCodes.ContainsKey(key)) { BodyCodes.Add(key, lastPageInfo.BodyCodes[key]); } } foreach (var key in lastPageInfo.FootCodes.Keys) { if (!FootCodes.ContainsKey(key)) { FootCodes.Add(key, lastPageInfo.FootCodes[key]); } } foreach (var key in lastPageInfo.HeadCodes.Keys) { if (!HeadCodes.ContainsKey(key)) { HeadCodes.Add(key, lastPageInfo.HeadCodes[key]); } } }