Sdílet prostřednictvím


XslCompiledTransform.TemporaryFiles Vlastnost

Definice

TempFileCollection Získá, který obsahuje dočasné soubory vygenerované na disku po úspěšném volání metodyLoad.

public:
 property System::CodeDom::Compiler::TempFileCollection ^ TemporaryFiles { System::CodeDom::Compiler::TempFileCollection ^ get(); };
public System.CodeDom.Compiler.TempFileCollection TemporaryFiles { get; }
member this.TemporaryFiles : System.CodeDom.Compiler.TempFileCollection
Public ReadOnly Property TemporaryFiles As TempFileCollection

Hodnota vlastnosti

TempFileCollection

Obsahuje TempFileCollection dočasné soubory generované na disku. Tato hodnota je null v případě, že Load metoda nebyla úspěšně volána nebo pokud ladění nebylo povoleno.

Příklady

Následující příklad zapíše názvy dočasných souborů do konzoly.

Poznámka

Dočasné soubory se vytvářejí pouze při načítání šablon stylů s <msxsl:script> bloky.

// Create the XslCompiledTransform object.
XslCompiledTransform xslt = new XslCompiledTransform(true);

// Load the style sheet and enable scripts.
// Temporary files are created only for style sheets with <msxsl:script> blocks.
xslt.Load("output.xsl", XsltSettings.TrustedXslt, new XmlUrlResolver());

// Transform the file.
xslt.Transform("books.xml", "output.xml");

// Output names of temporary files.
foreach (string filename in xslt.TemporaryFiles)
    Console.WriteLine(filename);
' Create the XslCompiledTransform object.
Dim xslt As New XslCompiledTransform(True)

' Load the style sheet and enable scripts.
' Temporary files are created only for style sheets with <msxsl:script> blocks.
xslt.Load("output.xsl", XsltSettings.TrustedXslt, New XmlUrlResolver())

' Transform the file.
xslt.Transform("books.xml", "output.xml")

' Output names of temporary files.
Dim filename As String
For Each filename In xslt.TemporaryFiles
    Console.WriteLine(filename)
Next filename

Poznámky

Tato vlastnost identifikuje soubory, které byly generovány během zpracování XSLT. Soubory se umístí do dočasného adresáře (určeného proměnnou prostředí %TEMP% ) Tyto soubory můžete odstranit po dokončení zpracování XSLT.

Platí pro

Viz také