Szerkesztés

Megosztás a következőn keresztül:


TempFileCollection Constructors

Definition

Initializes a new instance of the TempFileCollection class.

Overloads

TempFileCollection()

Initializes a new instance of the TempFileCollection class with default values.

TempFileCollection(String)

Initializes a new instance of the TempFileCollection class using the specified temporary directory that is set to delete the temporary files after their generation and use, by default.

TempFileCollection(String, Boolean)

Initializes a new instance of the TempFileCollection class using the specified temporary directory and specified value indicating whether to keep or delete the temporary files after their generation and use, by default.

TempFileCollection()

Source:
TempFileCollection.cs
Source:
TempFileCollection.cs
Source:
TempFileCollection.cs
Source:
TempFileCollection.cs

Initializes a new instance of the TempFileCollection class with default values.

public:
 TempFileCollection();
public TempFileCollection ();
Public Sub New ()

Remarks

This is a parameterless constructor that initializes the collection with default settings. By default, this temporary files collection will store the files in a default temporary directory and will delete the temporary files after they have been generated and used.

Applies to

TempFileCollection(String)

Source:
TempFileCollection.cs
Source:
TempFileCollection.cs
Source:
TempFileCollection.cs
Source:
TempFileCollection.cs

Initializes a new instance of the TempFileCollection class using the specified temporary directory that is set to delete the temporary files after their generation and use, by default.

public:
 TempFileCollection(System::String ^ tempDir);
public TempFileCollection (string tempDir);
new System.CodeDom.Compiler.TempFileCollection : string -> System.CodeDom.Compiler.TempFileCollection
Public Sub New (tempDir As String)

Parameters

tempDir
String

A path to the temporary directory to use for storing the temporary files.

Applies to

TempFileCollection(String, Boolean)

Source:
TempFileCollection.cs
Source:
TempFileCollection.cs
Source:
TempFileCollection.cs
Source:
TempFileCollection.cs

Initializes a new instance of the TempFileCollection class using the specified temporary directory and specified value indicating whether to keep or delete the temporary files after their generation and use, by default.

public:
 TempFileCollection(System::String ^ tempDir, bool keepFiles);
public TempFileCollection (string tempDir, bool keepFiles);
new System.CodeDom.Compiler.TempFileCollection : string * bool -> System.CodeDom.Compiler.TempFileCollection
Public Sub New (tempDir As String, keepFiles As Boolean)

Parameters

tempDir
String

A path to the temporary directory to use for storing the temporary files.

keepFiles
Boolean

true if the temporary files should be kept after use; false if the temporary files should be deleted.

Remarks

The value of keepFiles is used to set the KeepFiles parameter. The temporary files in the collection are retained or deleted upon the completion of compiler activity based on the value of the KeepFiles property in the collection. As each file is added to the collection, the current value of KeepFiles is associated with it, unless it is added with a method that has a keepFile parameter, in which case that value is used for that specific file. When the Delete method is called, if KeepFiles is true, all files are deleted, including those added with a KeepFiles value of true. This allows specific files, those identified as being keep files, to be temporarily retained after compilation for purposes such as error reporting, then deleted when they are no longer needed.

Applies to