다음을 통해 공유


DirectiveProcessor.Errors Property

Gets the errors that occurred when processing directives.

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

Syntax

'Declaration
Protected Property Errors As CompilerErrorCollection
protected CompilerErrorCollection Errors { get; private set; }
protected:
property CompilerErrorCollection^ Errors {
    CompilerErrorCollection^ get ();
    private: void set (CompilerErrorCollection^ value);
}
member Errors : CompilerErrorCollection with get, private set
function get Errors () : CompilerErrorCollection 
private function set Errors (value : CompilerErrorCollection)

Property Value

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

Remarks

Errors that occur when processing directives can be stored in this property. The engine passes the errors to the host when it is finished 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