다음을 통해 공유


ITextTemplatingEngineHost.StandardAssemblyReferences 속성

어셈블리 참조의 목록을 가져옵니다.

네임스페이스:  Microsoft.VisualStudio.TextTemplating
어셈블리:  Microsoft.VisualStudio.TextTemplating.Interfaces.10.0(Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll)

구문

‘선언
ReadOnly Property StandardAssemblyReferences As IList(Of String)
    Get
IList<string> StandardAssemblyReferences { get; }
property IList<String^>^ StandardAssemblyReferences {
    IList<String^>^ get ();
}
abstract StandardAssemblyReferences : IList<string>
function get StandardAssemblyReferences () : IList<String>

속성 값

형식: System.Collections.Generic.IList<String>
어셈블리 이름이 포함된 IList입니다.

설명

호스트는 생성된 변환 클래스(예: System.dll)가 참조할 수 있도록 표준 어셈블리를 지정할 수 있습니다. 엔진은 생성된 변환 클래스를 컴파일하고 실행할 때 이러한 참조를 사용합니다.

예제

다음 코드 예제에서는 사용자 지정 호스트에 대한 가능한 구현을 보여 줍니다. 이 코드 예제는 보다 큰 예제의 일부입니다. 전체 예제를 보려면 연습: 사용자 지정 텍스트 템플릿 호스트 만들기을 참조하십시오.

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 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

ITextTemplatingEngineHost 인터페이스

Microsoft.VisualStudio.TextTemplating 네임스페이스

기타 리소스

연습: 사용자 지정 텍스트 템플릿 호스트 만들기

코드 생성 및 T4 텍스트 템플릿