// 在一个页面流程内部,要使用多个秒表时,用名称以区分 public static void Start(String stopwatchName) { System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Reset(); stopwatch.Start(); CurrentRequest.setItem(stopwatchName, stopwatch); }
private void logTemplate(string templatePath) { //logger.Info( "load template=>" + templatePath ); List <String> tplList = CurrentRequest.getItem(loadedTemplates) as List <String>; if (tplList == null) { tplList = new List <string>(); } tplList.Add(templatePath); CurrentRequest.setItem(loadedTemplates, tplList); }