public virtual bool LoadIncludeText(string requestFileName, out string content, out string location)
{
content = System.String.Empty;
location = System.String.Empty;
//If the argument is the fully qualified path of an existing file,
//then we are done.
if (File.Exists(requestFileName))
{
content = File.ReadAllText(requestFileName);
return true;
}
string candidate = Path.Combine(Path.GetDirectoryName(this.TemplateFile), requestFileName);
if (File.Exists(candidate))
{
content = File.ReadAllText(candidate);
return true;
}
//This can be customized to search specific paths for the file.
else
{
return false;
}
}