Share via


ITextTemplatingEngineHost.StandardImports Property

Gets a list of namespaces.

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

Syntax

'Declaration
ReadOnly Property StandardImports As IList(Of String)
IList<string> StandardImports { get; }
property IList<String^>^ StandardImports {
    IList<String^>^ get ();
}
abstract StandardImports : IList<string>
function get StandardImports () : IList<String>

Property Value

Type: System.Collections.Generic.IList<String>
An IList that contains namespaces.

Remarks

Allows a host to specify standard namespaces to be imported by the generated transformation class (for example, System). The engine adds these statements to the generated transformation class.

Examples

The following code example shows a possible implementation for a custom host. This code example is part of a larger example. For the complete example, see Walkthrough: Creating a Custom Text Template Host.

public IList<string> StandardImports
{
    get
    {
        return new string[]
        {
            "System"
        };
    }
}
Public ReadOnly Property StandardImports() As IList(Of String) Implements Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.StandardImports
    Get
        Return New String() {"System"}
    End Get
End Property

.NET Framework Security

See Also

Reference

ITextTemplatingEngineHost Interface

Microsoft.VisualStudio.TextTemplating Namespace

Other Resources

Walkthrough: Creating a Custom Text Template Host

Code Generation and T4 Text Templates