We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

ITextTemplatingCallback Interface

Implement this interface if you are using the STextTemplating service and you want to be informed of errors when a template is processed. You can also get the file extension and output encoding requested by the template.

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

public interface ITextTemplatingCallback

The ITextTemplatingCallback type exposes the following members.

Public methodErrorCallbackCalled when an error is encountered in processing a text template. If you are using the STextTemplating service, the error will also be displayed in the Visual Studio error window.
Public methodSetFileExtensionCalled when an output directive is encountered in the template, to inform you of the file extension requested in the output directive.
Public methodSetOutputEncodingCalled once when a text template is processed, to inform you of the character encoding to be used for the output.