public NotificationCallbacks()

in simpleProviderManaged/NotificationCallbacks.cs [15:85]


        public NotificationCallbacks(
            SimpleProvider provider,
            VirtualizationInstance virtInstance,
            IReadOnlyCollection<NotificationMapping> notificationMappings)
        {
            this.provider = provider;

            // Look through notificationMappings for all the set notification bits.  Supply a callback
            // for each set bit.
            NotificationType notification = NotificationType.None;
            foreach (NotificationMapping mapping in notificationMappings)
            {
                notification |= mapping.NotificationMask;
            }

            if ((notification & NotificationType.FileOpened) == NotificationType.FileOpened)
            {
                virtInstance.OnNotifyFileOpened = NotifyFileOpenedCallback;
            }

            if ((notification & NotificationType.NewFileCreated) == NotificationType.NewFileCreated)
            {
                virtInstance.OnNotifyNewFileCreated = NotifyNewFileCreatedCallback;
            }

            if ((notification & NotificationType.FileOverwritten) == NotificationType.FileOverwritten)
            {
                virtInstance.OnNotifyFileOverwritten = NotifyFileOverwrittenCallback;
            }

            if ((notification & NotificationType.PreDelete) == NotificationType.PreDelete)
            {
                virtInstance.OnNotifyPreDelete = NotifyPreDeleteCallback;
            }

            if ((notification & NotificationType.PreRename) == NotificationType.PreRename)
            {
                virtInstance.OnNotifyPreRename = NotifyPreRenameCallback;
            }

            if ((notification & NotificationType.PreCreateHardlink) == NotificationType.PreCreateHardlink)
            {
                virtInstance.OnNotifyPreCreateHardlink = NotifyPreCreateHardlinkCallback;
            }

            if ((notification & NotificationType.FileRenamed) == NotificationType.FileRenamed)
            {
                virtInstance.OnNotifyFileRenamed = NotifyFileRenamedCallback;
            }

            if ((notification & NotificationType.HardlinkCreated) == NotificationType.HardlinkCreated)
            {
                virtInstance.OnNotifyHardlinkCreated = NotifyHardlinkCreatedCallback;
            }

            if ((notification & NotificationType.FileHandleClosedNoModification) == NotificationType.FileHandleClosedNoModification)
            {
                virtInstance.OnNotifyFileHandleClosedNoModification = NotifyFileHandleClosedNoModificationCallback;
            }

            if (((notification & NotificationType.FileHandleClosedFileModified) == NotificationType.FileHandleClosedFileModified) ||
                ((notification & NotificationType.FileHandleClosedFileDeleted) == NotificationType.FileHandleClosedFileDeleted))
            {
                virtInstance.OnNotifyFileHandleClosedFileModifiedOrDeleted = NotifyFileHandleClosedFileModifiedOrDeletedCallback;
            }

            if ((notification & NotificationType.FilePreConvertToFull) == NotificationType.FilePreConvertToFull)
            {
                virtInstance.OnNotifyFilePreConvertToFull = NotifyFilePreConvertToFullCallback;
            }
        }