Condividi tramite


FileSystemWatcher.WaitForChanged Metodo

Definizione

Metodo sincrono che restituisce una struttura contenente informazioni specifiche sulla modifica che si è verificata.

Overload

Nome Descrizione
WaitForChanged(WatcherChangeTypes)

Metodo sincrono che restituisce una struttura che contiene informazioni specifiche sulla modifica che si è verificata, dato il tipo di modifica che si desidera monitorare.

WaitForChanged(WatcherChangeTypes, Int32)

Metodo sincrono che restituisce una struttura che contiene informazioni specifiche sulla modifica che si è verificata, dato il tipo di modifica che si desidera monitorare e il tempo (in millisecondi) di attesa prima del timeout.

WaitForChanged(WatcherChangeTypes, TimeSpan)

Restituisce in modo sincrono una struttura che contiene informazioni specifiche sulla modifica che si è verificata, dato il tipo di modifica da monitorare.

WaitForChanged(WatcherChangeTypes)

Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs

Metodo sincrono che restituisce una struttura che contiene informazioni specifiche sulla modifica che si è verificata, dato il tipo di modifica che si desidera monitorare.

public:
 System::IO::WaitForChangedResult WaitForChanged(System::IO::WatcherChangeTypes changeType);
public System.IO.WaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType);
member this.WaitForChanged : System.IO.WatcherChangeTypes -> System.IO.WaitForChangedResult
Public Function WaitForChanged (changeType As WatcherChangeTypes) As WaitForChangedResult

Parametri

changeType
WatcherChangeTypes

Oggetto WatcherChangeTypes da controllare.

Restituisce

Oggetto WaitForChangedResult che contiene informazioni specifiche sulla modifica che si è verificata.

Commenti

Questo metodo attende a tempo indeterminato fino a quando non si verifica la prima modifica e quindi restituisce. Questa operazione equivale a usare WaitForChanged con il timeout parametro impostato su -1.

Annotazioni

Questo metodo consente di richiamare un gestore eventi per rispondere alle modifiche dei file anche se la EnableRaisingEvents proprietà è impostata su false.

In alcuni sistemi, FileSystemWatcher segnala le modifiche ai file usando il formato breve del nome file 8.3. Ad esempio, una modifica a "LongFileName.LongExtension" può essere segnalata come "LongFi~. Lon".

Vedi anche

Si applica a

WaitForChanged(WatcherChangeTypes, Int32)

Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs

Metodo sincrono che restituisce una struttura che contiene informazioni specifiche sulla modifica che si è verificata, dato il tipo di modifica che si desidera monitorare e il tempo (in millisecondi) di attesa prima del timeout.

public:
 System::IO::WaitForChangedResult WaitForChanged(System::IO::WatcherChangeTypes changeType, int timeout);
public System.IO.WaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, int timeout);
member this.WaitForChanged : System.IO.WatcherChangeTypes * int -> System.IO.WaitForChangedResult
Public Function WaitForChanged (changeType As WatcherChangeTypes, timeout As Integer) As WaitForChangedResult

Parametri

changeType
WatcherChangeTypes

Oggetto WatcherChangeTypes da controllare.

timeout
Int32

Tempo di attesa in millisecondi prima del timeout.

Restituisce

Oggetto WaitForChangedResult che contiene informazioni specifiche sulla modifica che si è verificata.

Commenti

Questo metodo attende fino a quando non si verifica una modifica o si è verificato il timeout. Un valore di -1 per il timeout parametro indica un'attesa illimitata.

Annotazioni

Questo metodo consente di richiamare un gestore eventi per rispondere alle modifiche dei file anche se la EnableRaisingEvents proprietà è impostata su false.

In alcuni sistemi, FileSystemWatcher segnala le modifiche ai file usando il formato breve del nome file 8.3. Ad esempio, una modifica a "LongFileName.LongExtension" può essere segnalata come "LongFi~. Lon".

Vedi anche

Si applica a

WaitForChanged(WatcherChangeTypes, TimeSpan)

Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs
Origine:
FileSystemWatcher.cs

Restituisce in modo sincrono una struttura che contiene informazioni specifiche sulla modifica che si è verificata, dato il tipo di modifica da monitorare.

public:
 System::IO::WaitForChangedResult WaitForChanged(System::IO::WatcherChangeTypes changeType, TimeSpan timeout);
public System.IO.WaitForChangedResult WaitForChanged(System.IO.WatcherChangeTypes changeType, TimeSpan timeout);
member this.WaitForChanged : System.IO.WatcherChangeTypes * TimeSpan -> System.IO.WaitForChangedResult
Public Function WaitForChanged (changeType As WatcherChangeTypes, timeout As TimeSpan) As WaitForChangedResult

Parametri

changeType
WatcherChangeTypes

Oggetto WatcherChangeTypes da controllare.

timeout
TimeSpan

Quantità di tempo di attesa prima del timeout.

Restituisce

Oggetto WaitForChangedResult che contiene informazioni specifiche sulla modifica che si è verificata.

Commenti

Vedere WaitForChanged(WatcherChangeTypes, Int32) le osservazioni.

Si applica a