/// <summary> /// Initializes a new instance of the NotifyEventArgs class. /// </summary> /// <param name="f">An <see cref="FdiNotification"/> struction that contains notification information.</param> public NotifyEventArgs(FdiNotification f) { fdin = f; result = 0; }
/// <summary> /// Receives notification callbacks from the File Decompression Interface (FDI). /// </summary> /// <param name="fdint">A <see cref="FdiNotificationType"/> value that specifies which notification is being sent.</param> /// <param name="fdin">A <see cref="FdiNotification"/> that contains information about the notification</param> /// <returns>The return value is dependent on the notification type.</returns> /// <remarks>The File Decompression Interface (FDI)provides notifications for six different events. Clients must respond to those /// notifications by handling the <see cref="NotifyCabinetInfo"/>, <see cref="NotifyCloseFile"/>, <see cref="NotifyCopyFile"/>, /// <see cref="NotifyEnumerate"/>, <see cref="NotifyNextCabinet"/>, and <see cref="NotifyPartialFile"/> events.</remarks> internal virtual int NotifyCallback(FdiNotificationType fdint, FdiNotification fdin) { Trace.WriteLine(string.Format("NotifyCallback: type {0}", fdint)); NotifyEventArgs e = new NotifyEventArgs(fdin); // fire the proper event switch (fdint) { case FdiNotificationType.CabinetInfo: OnNotifyCabinetInfo(e); break; case FdiNotificationType.CloseFileInfo: OnNotifyCloseFile(e); break; case FdiNotificationType.CopyFile: OnNotifyCopyFile(e); break; case FdiNotificationType.Enumerate: OnNotifyEnumerate(e); break; case FdiNotificationType.NextCabinet: OnNotifyNextCabinet(e); break; case FdiNotificationType.PartialFile: OnNotifyPartialFile(e); break; } return e.Result; }