TempFileCollection Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Initierar en ny instans av TempFileCollection klassen.
Överlagringar
| Name | Description |
|---|---|
| TempFileCollection() |
Initierar en ny instans av TempFileCollection klassen med standardvärden. |
| TempFileCollection(String) |
Initierar en ny instans av TempFileCollection klassen med den angivna temporära katalogen som är inställd på att ta bort de temporära filerna efter att de har skapats och använts, som standard. |
| TempFileCollection(String, Boolean) |
Initierar en ny instans av TempFileCollection klassen med den angivna temporära katalogen och angivet värde som anger om de temporära filerna ska behållas eller tas bort efter att de har skapats och använts som standard. |
TempFileCollection()
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
Initierar en ny instans av TempFileCollection klassen med standardvärden.
public:
TempFileCollection();
public TempFileCollection();
Public Sub New ()
Kommentarer
Det här är en parameterlös konstruktor som initierar samlingen med standardinställningar. Som standard lagrar den här temporära filsamlingen filerna i en tillfällig standardkatalog och tar bort de temporära filerna när de har genererats och använts.
Gäller för
TempFileCollection(String)
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
Initierar en ny instans av TempFileCollection klassen med den angivna temporära katalogen som är inställd på att ta bort de temporära filerna efter att de har skapats och använts, som standard.
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)
Parametrar
- tempDir
- String
En sökväg till den temporära katalog som ska användas för att lagra de temporära filerna.
Gäller för
TempFileCollection(String, Boolean)
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
- Källa:
- TempFileCollection.cs
Initierar en ny instans av TempFileCollection klassen med den angivna temporära katalogen och angivet värde som anger om de temporära filerna ska behållas eller tas bort efter att de har skapats och använts som standard.
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)
Parametrar
- tempDir
- String
En sökväg till den temporära katalog som ska användas för att lagra de temporära filerna.
- keepFiles
- Boolean
true om de temporära filerna ska behållas efter användning; false om de temporära filerna ska tas bort.
Kommentarer
Värdet keepFiles för används för att ange parametern KeepFiles . De temporära filerna i samlingen behålls eller tas bort när kompilatoraktiviteten har slutförts baserat på värdet KeepFiles för egenskapen i samlingen. När varje fil läggs till i samlingen är det aktuella värdet KeepFiles associerat med den, såvida den inte läggs till med en metod som har en keepFile parameter, i vilket fall det värdet används för den specifika filen.
Delete När metoden anropas, om KeepFiles är true, tas alla filer bort, inklusive de som läggs till med värdet KeepFilestrue. Detta gör att specifika filer, de som identifieras som kvarhållna filer, tillfälligt kan behållas efter kompileringen för ändamål som felrapportering och sedan tas bort när de inte längre behövs.