ITextTemplatingEngineHost.StandardAssemblyReferences Property
Gets a list of assembly references.
Namespace: Microsoft.VisualStudio.TextTemplating
Assembly: Microsoft.VisualStudio.TextTemplating.Interfaces.10.0 (in Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll)
Syntax
'Declaration
ReadOnly Property StandardAssemblyReferences As IList(Of String)
IList<string> StandardAssemblyReferences { get; }
property IList<String^>^ StandardAssemblyReferences {
IList<String^>^ get ();
}
abstract StandardAssemblyReferences : IList<string> with get
function get StandardAssemblyReferences () : IList<String>
Property Value
Type: IList<String>
An IList that contains assembly names.
Remarks
Allows a host to specify standard assemblies to be referenced by the generated transformation class (for example, System.dll). The engine uses these references when it compiles and executes 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> StandardAssemblyReferences
{
get
{
return new string[]
{
//if this host searches standard paths and the GAC
//we can specify the assembly name like this
//---------------------------------------------------------
//"System"
//because this host only resolves assemblies from the
//fully qualified path and name of the assembly
//this is a quick way to get the code to give us the
//fully qualified path and name of the System assembly
//---------------------------------------------------------
typeof(System.Uri).Assembly.Location
};
}
}
Public ReadOnly Property StandardAssemblyReferences() As IList(Of String) Implements Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.StandardAssemblyReferences
Get
'if this host searches standard paths and the GAC
'we can specify the assembly name like this
'---------------------------------------------------------
'Return New String() {"System"}
'because this host only resolves assemblies from the
'fully qualified path and name of the assembly
'this is a quick way to get the code to give us the
'fully qualified path and name of the System assembly
'---------------------------------------------------------
Return New String() {(New System.UriBuilder()).GetType().Assembly.Location}
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.
See Also
Reference
ITextTemplatingEngineHost Interface
Microsoft.VisualStudio.TextTemplating Namespace