Поделиться через


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)

Syntax

'Declaration
<CLSCompliantAttribute(True)> _
Public Interface ITextTemplatingCallback
[CLSCompliantAttribute(true)]
public interface ITextTemplatingCallback
[CLSCompliantAttribute(true)]
public interface class ITextTemplatingCallback
[<CLSCompliantAttribute(true)>]
type ITextTemplatingCallback =  interface end
public interface ITextTemplatingCallback

The ITextTemplatingCallback type exposes the following members.

Methods

  Name Description
Public method ErrorCallback Called 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 method SetFileExtension Called when an output directive is encountered in the template, to inform you of the file extension requested in the output directive.
Public method SetOutputEncoding Called once when a text template is processed, to inform you of the character encoding to be used for the output.

Top

Remarks

For more information, see Invoking Text Transformation in a VS Extension.

See Also

Reference

Microsoft.VisualStudio.TextTemplating.VSHost Namespace