Ignore:
Timestamp:
3/14/2012 5:45:46 AM (2 years ago)
Author:
lowjoel
Message:

Redesign the Eraser Plugin framework.

  • Split the plugin-dependent interfaces and related support classes out to Eraser.Plugins assembly
    • The extension interfaces are in the Eraser.Plugins.ExtensionPoints? namespace.
      • New IClientTool interface for plugins to create Eraser-hosted tools (e.g. #147)
    • The Registrars are in the Eraser.Plugins.Registrars namespace
    • Base types are now interfaces, no longer abstract base classes
    • Version the Eraser.plugins assembly differently from the rest of the project so that other plugins can target different versions of Eraser with the same assembly. Change the Eraser.Plugins assembly version only if there is an API change.
  • Plugin loading behaviour:
    • Core plugins will be loaded before the rest of the plugins, but they will be loaded only by assembly name and not by path
    • Non-core plugin loading is handled by the Manager Library and not the Plugin code
    • The PluginInstance? class is now the PluginInfo? class
    • There is no longer a need to indicate the default file and unused space erasure methods, PRNGs etc; they are now hardcoded to prevent plugins from changing defaults.
  • The separate command line for the Eraser shell extension has been removed.
    • The Erase on Restart menu item has been removed (since it is a scheduling option and should be set in the Task Properties Dialog)
  • Task Progress information is now pulled from the Eraser core instead of pushed via events.
  • New persistent store class to generalise the use of the old Settings class
  • IDragAndDropConfigurerFactory for transforming drag-and-drop operations to erasure targets. This removes the Eraser.exe assembly's dependency on Eraser.DefaultPlugins?.

Closes #363.

Location:
trunk/eraser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser

  • trunk/eraser/Eraser.DefaultPlugins/ErasureTargets/FolderErasureTarget.cs

    r2222 r2509  
    3131using System.IO; 
    3232 
    33 using Eraser.Manager; 
    3433using Eraser.Util; 
     34using Eraser.Plugins; 
     35using Eraser.Plugins.ExtensionPoints; 
    3536 
    3637namespace Eraser.DefaultPlugins 
     
    4142    [Serializable] 
    4243    [Guid("F50B0A44-3AB1-4cab-B81E-1713AC3D28C9")] 
    43     public class FolderErasureTarget : FileSystemObjectErasureTarget 
     44    class FolderErasureTarget : FileSystemObjectErasureTarget 
    4445    { 
    4546        #region Serialization code 
     
    199200                    directory.GetFiles("*", SearchOption.AllDirectories).Length == 0) 
    200201                { 
    201                     FileSystem fsManager = ManagerLibrary.Instance.FileSystemRegistrar[ 
     202                    IFileSystem fsManager = Host.Instance.FileSystems[ 
    202203                        VolumeInfo.FromMountPoint(Path)]; 
    203                     fsManager.DeleteFolder(directory); 
     204                    fsManager.DeleteFolder(directory, true); 
    204205                } 
    205206            } 
     
    218219 
    219220            //Public progress updates. 
    220             OnProgressChanged(this, new ProgressChangedEventArgs(progress, 
    221                 new TaskProgressChangedEventArgs(info.FullName, 0, 0))); 
     221            progress.Tag = info.FullName; 
    222222 
    223223            //Ensure that the current directory is empty before deleting. 
     
    227227                try 
    228228                { 
    229                     ManagerLibrary.Instance.FileSystemRegistrar[ 
    230                         VolumeInfo.FromMountPoint(Path)].DeleteFolder(info); 
     229                    Host.Instance.FileSystems[VolumeInfo.FromMountPoint(Path)]. 
     230                        DeleteFolder(info, true); 
    231231                } 
    232232                catch (UnauthorizedAccessException) 
Note: See TracChangeset for help on using the changeset viewer.