다음을 통해 공유


Engine.PreprocessTemplate 메서드

컴파일되어 실행될 경우 템플릿 출력을 생성하는 템플릿에서 코드를 생성합니다.

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

구문

‘선언
Public Function PreprocessTemplate ( _
    content As String, _
    host As ITextTemplatingEngineHost, _
    className As String, _
    classNamespace As String, _
    <OutAttribute> ByRef language As String, _
    <OutAttribute> ByRef references As String() _
) As String
public string PreprocessTemplate(
    string content,
    ITextTemplatingEngineHost host,
    string className,
    string classNamespace,
    out string language,
    out string[] references
)
public:
virtual String^ PreprocessTemplate(
    String^ content, 
    ITextTemplatingEngineHost^ host, 
    String^ className, 
    String^ classNamespace, 
    [OutAttribute] String^% language, 
    [OutAttribute] array<String^>^% references
) sealed
abstract PreprocessTemplate : 
        content:string * 
        host:ITextTemplatingEngineHost * 
        className:string * 
        classNamespace:string * 
        language:string byref * 
        references:string[] byref -> string 
override PreprocessTemplate : 
        content:string * 
        host:ITextTemplatingEngineHost * 
        className:string * 
        classNamespace:string * 
        language:string byref * 
        references:string[] byref -> string 
public final function PreprocessTemplate(
    content : String, 
    host : ITextTemplatingEngineHost, 
    className : String, 
    classNamespace : String, 
    language : String, 
    references : String[]
) : String

매개 변수

  • content
    형식: System.String
    템플릿의 내용을 반환합니다.
  • className
    형식: System.String
    템플릿 코드에 포함할 클래스의 이름입니다.
  • classNamespace
    형식: System.String
    템플릿 코드를 생성할 네임스페이스입니다.
  • language
    형식: System.String%
    생성되는 코드의 언어입니다.
  • references
    형식: array<System.String[]%
    템플릿 또는 호스트에서 지정한 어셈블리입니다.

반환 값

형식: System.String
컴파일할 수 있는 문자열입니다.

구현

ITextTemplatingEngine.PreprocessTemplate(String, ITextTemplatingEngineHost, String, String, String%, array<String[]%)

설명

자세한 내용은 전처리 T4 텍스트 템플릿을 사용하여 런타임 텍스트 생성사용자 지정 호스트를 사용하여 텍스트 템플릿 처리을 참조하십시오.

Visual Studio에서 실행될 패키지나 확장을 작성하는 경우 고유 호스트를 작성하는 대신 텍스트 템플릿 서비스를 사용하십시오. 자세한 내용은 VS 확장에서 텍스트 변환 호출을 참조하십시오.

.NET Framework 보안

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

참고 항목

참조

Engine 클래스

Microsoft.VisualStudio.TextTemplating 네임스페이스