DirectiveProcessor.Errors Property
Gets the errors that occurred while processing directives.
Namespace: Microsoft.VisualStudio.TextTemplating
Assembly: Microsoft.VisualStudio.TextTemplating (in Microsoft.VisualStudio.TextTemplating.dll)
Syntax
'Declaration
Protected ReadOnly Property Errors As CompilerErrorCollection
'Usage
Dim value As CompilerErrorCollection
value = Me.Errors
protected CompilerErrorCollection Errors { get; }
protected:
property CompilerErrorCollection^ Errors {
CompilerErrorCollection^ get ();
}
protected 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.