XslCompiledTransform.TemporaryFiles Właściwość

Definicja

Pobiera plik TempFileCollection tymczasowy wygenerowany na dysku po pomyślnym wywołaniu Load metody .

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

Wartość właściwości

Element TempFileCollection zawierający pliki tymczasowe wygenerowane na dysku. Ta wartość jest null taka, jeśli Load metoda nie została pomyślnie wywołana lub jeśli debugowanie nie zostało włączone.

Przykłady

Poniższy przykład zapisuje nazwy plików tymczasowych w konsoli programu .

Uwaga

Pliki tymczasowe są tworzone tylko podczas ładowania arkuszy stylów za pomocą <bloków msxsl:script> .

// 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

Uwagi

Ta właściwość identyfikuje pliki, które zostały wygenerowane podczas przetwarzania XSLT. Pliki są umieszczane w katalogu tymczasowym (określonym przez zmienną środowiskową %TEMP%) Te pliki można usunąć po zakończeniu przetwarzania XSLT.

Dotyczy

Zobacz też