XslCompiledTransform.TemporaryFiles 속성

정의

TempFileCollection 메서드가 성공적으로 호출된 이후에 디스크에 생성된 임시 파일이 들어 있는 Load을 가져옵니다.

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

속성 값

TempFileCollection

디스크에 생성된 임시 파일이 들어 있는 TempFileCollection입니다. Load 메서드를 호출하지 못했거나 디버깅을 사용하지 않도록 설정한 경우에는 값이 null입니다.

예제

다음 예제에서는 임시 파일의 이름을 콘솔에 씁니다.

참고

임시 파일은 블록이 있는 스타일시트를 로드할 때만 만들어집니다 <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

설명

이 속성은 XSLT 처리 중에 생성된 파일을 식별합니다. 파일이 Temp 디렉터리(%TEMP% 환경 변수로 지정됨)에 배치됩니다. XSLT 처리가 완료된 후 이러한 파일을 삭제할 수 있습니다.

적용 대상

추가 정보