コード例 #1
0
        public SpineThread()
        {
            mSpine = new Spine(mVolumeEventController);

            VolumeSnapshotDirectory.IgnoredDirectoryNames.Add("nobackup");
            VolumeSnapshotDirectory.IgnoredDirectoryNames.Add("System Volume Information");

            mWorkerThread = new PWLib.BackgroundWorkerThread(100);
            mWorkerThread.InitialisationTask += new PWLib.BackgroundWorkerThread.Task(OnWorkerThreadInit);
            mWorkerThread.ShutdownTask       += new PWLib.BackgroundWorkerThread.Task(OnWorkerShutdown);

            mVolumeEventController.VolumeDescriptorActiveStateChanged += new VolumeDescriptorChangedHandler(mVolumeEventController_VolumeDescriptorActiveStateChanged);
            mVolumeEventController.VolumeSourceActiveStateChanged     += new VolumeSourceActiveChangedHandler(mVolumeEventController_VolumeSourceActiveStateChanged);

            mWorkerThread.RegisterPersistentTask(new PWLib.BackgroundWorkerThread.Task(OnWorkerPersistentTask), null);
        }
コード例 #2
0
        public SpineThread()
        {
            mSpine = new Spine( mVolumeEventController );

            VolumeSnapshotDirectory.IgnoredDirectoryNames.Add( "nobackup" );
            VolumeSnapshotDirectory.IgnoredDirectoryNames.Add( "System Volume Information" );

            mWorkerThread = new PWLib.BackgroundWorkerThread( 100 );
            mWorkerThread.InitialisationTask += new PWLib.BackgroundWorkerThread.Task(OnWorkerThreadInit);
            mWorkerThread.ShutdownTask += new PWLib.BackgroundWorkerThread.Task(OnWorkerShutdown);

            mVolumeEventController.VolumeDescriptorActiveStateChanged += new VolumeDescriptorChangedHandler( mVolumeEventController_VolumeDescriptorActiveStateChanged );
            mVolumeEventController.VolumeSourceActiveStateChanged += new VolumeSourceActiveChangedHandler( mVolumeEventController_VolumeSourceActiveStateChanged );

            mWorkerThread.RegisterPersistentTask( new PWLib.BackgroundWorkerThread.Task( OnWorkerPersistentTask ), null );
        }