DirectiveProcessor.Errors Property

Gets the errors that occurred while processing directives.

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

Syntax

'Declaration
Protected ReadOnly Property Errors As CompilerErrorCollection
protected CompilerErrorCollection Errors { get; }
protected:
property CompilerErrorCollection^ Errors {
    CompilerErrorCollection^ get ();
}
member Errors : CompilerErrorCollection
function get Errors () : CompilerErrorCollection

Property Value

Type: System.CodeDom.Compiler.CompilerErrorCollection
A CompilerErrorCollection that contains the errors and warnings that occurred while processing directives.

Remarks

Errors that occur while processing directives can be stored in this property. The engine passes the errors to the host when it is done processing, and the host can decide how to display them. For example the host can display the errors in the UI or write them to a file.

Examples

The following code example shows a possible implementation for a custom directive processor. This code example is part of a larger example provided for the DirectiveProcessor class.

private CompilerErrorCollection errorsValue;
public new CompilerErrorCollection Errors
{
    get { return errorsValue; }
}
Private errorsValue As CompilerErrorCollection
Public Shadows ReadOnly Property Errors() As CompilerErrorCollection
    Get
        Return errorsValue
    End Get
End Property

.NET Framework Security

See Also

Reference

DirectiveProcessor Class

Microsoft.VisualStudio.TextTemplating Namespace