Export (0) Print
Expand All

ITextTemplatingEngineHost.TemplateFile Property

Gets the path and file name of the text template that is being processed.

Namespace: Microsoft.VisualStudio.TextTemplating
Assembly: Microsoft.VisualStudio.TextTemplating (in microsoft.visualstudio.texttemplating.dll)

string TemplateFile { get; }
/** @property */
String get_TemplateFile ()

function get TemplateFile () : String

Property Value

A String that contains the path and file name of the text template that is being processed.

The following code example shows a possible implementation for a custom host. This code example is part of a larger example provided for the ITextTemplatingEngineHost interface.

string candidate = Path.Combine(Path.GetDirectoryName(this.TemplateFile), fileName);
if (File.Exists(candidate))
{
       return candidate;
}

Community Additions

ADD
Show:
© 2015 Microsoft