Export (0) Print
Expand All

ITextTemplatingEngineHost.StandardImports Property

Gets a list of namespaces.

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

IList<string> StandardImports { get; }

Property Value

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

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.

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"
        };
    }
}

Community Additions

ADD
Show:
© 2014 Microsoft