Gets a list of namespaces.
Namespace: Microsoft.VisualStudio.TextTemplating
Assembly: Microsoft.VisualStudio.TextTemplating (in Microsoft.VisualStudio.TextTemplating.dll)
Syntax
'宣言
ReadOnly Property StandardImports As IList(Of String)
'使用
Dim instance As ITextTemplatingEngineHost
Dim value As IList(Of String)
value = instance.StandardImports
IList<string> StandardImports { get; }
property IList<String^>^ StandardImports {
IList<String^>^ get ();
}
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 provided for the ITextTemplatingEngineHost interface.
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
Permissions
- 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.
See Also
Concepts
About Text Template Hosts
Walkthrough: Creating a Custom Text Template Host
Generating Artifacts Using Text Templates
Reference
ITextTemplatingEngineHost Interface