/// <summary> /// /// </summary> /// <param name="keyPath"></param> public static void OpenReport(string keyPath) { string reportPath = Path.Combine(Options.FullTempDirectory, ContentUtils.GetHashedFileName(keyPath, ".html")); if (File.Exists(reportPath)) { Misc.ShellExecute(reportPath); } else { throw new BuildException(string.Format("File {0} not found", reportPath)); } }
/// <summary> /// Generates temporary file name for given key with given extension /// and return full path to this file. /// </summary> /// <param name="key">unique key string value</param> /// <param name="ext">Desired extension with leading dot</param> /// <returns>Full path for generated file name.</returns> public string GetTempFileFullPath(string key, string ext) { var fileName = ContentUtils.GetHashedFileName(key, ext); return(Path.Combine(Options.FullTempDirectory, fileName)); }