다음을 통해 공유


Engine.PreprocessTemplate 메서드

템플릿에서 템플릿 출력 컴파일되고 실행 시에 생성 하는 코드를 생성 합니다.

네임스페이스:  Microsoft.VisualStudio.TextTemplating
어셈블리:  Microsoft.VisualStudio.TextTemplating.12.0(Microsoft.VisualStudio.TextTemplating.12.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
    형식: String

    템플릿의 내용을 반환합니다.

  • host
    형식: ITextTemplatingEngineHost

    ITextTemplatingEngineHost를 구현해야 하는 템플릿 호스트입니다.

  • className
    형식: String

    템플릿 코드에 포함할 클래스의 이름입니다.

  • classNamespace
    형식: String

    템플릿 코드를 생성할 네임스페이스입니다.

  • language
    형식: String%

    생성되는 코드의 언어입니다.

  • references
    형식: array<String[]%

    템플릿 또는 호스트에서 지정한 어셈블리입니다.

반환 값

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

구현

ITextTemplatingEngine.PreprocessTemplate(String, ITextTemplatingEngineHost, String, String, String, String)

설명

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

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

.NET Framework 보안

참고 항목

참조

Engine 클래스

Microsoft.VisualStudio.TextTemplating 네임스페이스