Export (0) Print
Expand All

ITextTemplatingEngineHost.SetOutputEncoding Method

Tells the host the encoding that is expected for the generated text output.

Namespace:  Microsoft.VisualStudio.TextTemplating
Assembly:  Microsoft.VisualStudio.TextTemplating.Interfaces.10.0 (in Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll)

function SetOutputEncoding(
	encoding : Encoding, 
	fromOutputDirective : boolean
)

Parameters

encoding
Type: Encoding

The encoding for the generated text output.

fromOutputDirective
Type: Boolean

true to indicate that the user specified the encoding in the encoding parameter of the output directive.

The engine calls this method if the user has specified the optional encoding parameter of the template directive in a text template. For more information, see T4 Text Template Directives.

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.

Show:
© 2015 Microsoft