public void TestGetTemplateHandleFullPath() { string templateHandleRootDirPath = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, TemplateHandleRootDirPath)); string handlePath = MonitorReportFile.GetTemplateHandlePath(templateHandleRootDirPath, "PhShouLianWeeklyReport"); Assert.IsTrue(File.Exists(handlePath)); }
public static string CallTemplateHandle(TemplateHandlerPrams para, string handleName) { const string method = "WriteFile"; string dependPath = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, DependPath)); string templateHandleRootDirPath = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, TemplateHandleRootDirPath)); string templateHandlePath = MonitorReportFile.GetTemplateHandlePath(templateHandleRootDirPath, handleName); var cp = new object[] { para }; CrossDomainCompiler.Call(templateHandlePath, dependPath, typeof(TemplateHandleBase), method, ref cp); return(para.FileFullName); }