Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ITextTemplatingEngineHost::LoadIncludeText Method

Acquires the text that corresponds to a request to include a partial text template file.

Namespace:  Microsoft.VisualStudio.TextTemplating
Assembly:  Microsoft.VisualStudio.TextTemplating.Interfaces.10.0 (in Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll)
bool LoadIncludeText(
	String^ requestFileName, 
	[OutAttribute] String^% content, 
	[OutAttribute] String^% location
)

Parameters

requestFileName
Type: String

The name of the partial text template file to acquire.

content
Type: String%

A String that contains the acquired text or Empty if the file could not be found.

location
Type: String%

A String that contains the location of the acquired text. If the host searches the registry for the location of include files or if the host searches multiple locations by default, the host can return the final path of the include file in this parameter. The host can set the location to Empty if the file could not be found or if the host is not file-system based.

Return Value

Type: Boolean
true to indicate that the host was able to acquire the text; otherwise, false.

If the user has specified the optional include directive in a text template, the engine calls this method. This method can be called 0, 1, or multiple times for each transformation. For more information, see T4 Text Template Directives.

This method can also be called from a custom directive processor.

The following code example shows a possible implementation for a custom host. This code example is part of a larger example. For the complete example, see Walkthrough: Creating a Custom Text Template Host.

No code example is currently available or this language may not be supported.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.