Sdílet prostřednictvím


Engine.PreprocessTemplate – metoda

Generování kódu ze šablony, které při spuštění a kompilované vygeneruje výstup šablony.

Obor názvů:  Microsoft.VisualStudio.TextTemplating
Sestavení:  Microsoft.VisualStudio.TextTemplating.10.0 (v Microsoft.VisualStudio.TextTemplating.10.0.dll)

Syntaxe

'Deklarace
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

Parametry

  • className
    Typ: System.String
    Název třídy, která má mít kód šablony.
  • classNamespace
    Typ: System.String
    Obor názvů, ve kterém má být generován kód šablony.
  • references
    Typ: array<System.String[]%
    Sestavení určené v šabloně nebo hostitele.

Vrácená hodnota

Typ: System.String
Řetězec, který lze sestavit.

Implementuje

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

Poznámky

Další informace naleznete v tématu Textové soubory při Spustit generování Čas pomocí předem zpracovaný text šablony a Zpracování pomocí hostitel Uživatelský text šablony.

Zabezpečení rozhraní .NET Framework

Viz také

Odkaz

Engine Třída

Microsoft.VisualStudio.TextTemplating – obor názvů