C# Class LazyCopy.DriverClientLibrary.NotificationsMonitor

Afficher le fichier Open project: aleksk/LazyCopy Class Usage Examples

Méthodes publiques

Méthode Description
NotificationsMonitor ( CancellationToken token, int bufferSize, object>.Func handler, IntPtr filterPortHandle, IntPtr completionPortHandle ) : System

Initializes a new instance of the NotificationsMonitor class.

The real buffer allocated will be bigger, than the bufferSize specified, because every notification should also contain DriverNotificationHeader structure. So we add it to the buffer to make sure it'll be large enough to store both header and data.

Private Methods

Méthode Description
CancelIo ( NativeOverlapped overlapped ) : void

Cancels the pending I/O on the filter port.

DoWork ( ) : void
GetNextNotification ( ResizableBuffer resizableBuffer, ManualResetEvent resetEvent, NativeOverlapped overlapped ) : bool
ProcessNotification ( ResizableBuffer resizableBuffer ) : void

Method Details

NotificationsMonitor() public méthode

Initializes a new instance of the NotificationsMonitor class.
The real buffer allocated will be bigger, than the bufferSize specified, because every notification should also contain DriverNotificationHeader structure. So we add it to the buffer to make sure it'll be large enough to store both header and data.
is invalid. /// is . /// -or- /// or are invalid pointers. ///
public NotificationsMonitor ( CancellationToken token, int bufferSize, object>.Func handler, IntPtr filterPortHandle, IntPtr completionPortHandle ) : System
token System.Threading.CancellationToken Cancellation token.
bufferSize int The desired size of the buffer used to store notification structures received from the driver into.
handler object>.Func User-defined notification handler.
filterPortHandle System.IntPtr Driver port handle.
completionPortHandle System.IntPtr Driver I/O completion port handle.
Résultat System