Changeset 2373


Ignore:
Timestamp:
11/7/2011 12:12:38 PM (3 years ago)
Author:
lowjoel
Message:

There is no longer a need to indicate the default file and unused space erasure methods, PRNGs etc; they will be hardcoded into the DefaultPlugins? since other plugins may vie for attention.

Location:
branches/eraser6/pluginsRewrite
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureMethods/Gutmann.cs

    r2368 r2373  
    3434namespace Eraser.DefaultPlugins 
    3535{ 
    36     [DefaultFileErasure(1)] 
    3736    [Guid("1407FC4E-FEFF-4375-B4FB-D7EFBB7E9922")] 
    3837    sealed class Gutmann : PassBasedErasureMethod 
  • branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/ErasureMethods/Random.cs

    r2368 r2373  
    3131namespace Eraser.DefaultPlugins 
    3232{ 
    33     [DefaultUnusedSpaceErasure(1)] 
    3433    [Guid("BF8BA267-231A-4085-9BF9-204DE65A6641")] 
    3534    sealed class Pseudorandom : PassBasedErasureMethod 
  • branches/eraser6/pluginsRewrite/Eraser.DefaultPlugins/RNGCrypto.cs

    r2368 r2373  
    3333namespace Eraser.DefaultPlugins 
    3434{ 
    35     [DefaultPrng(1)] 
    3635    [Guid("6BF35B8E-F37F-476e-B6B2-9994A92C3B0C")] 
    3736    public class RngCrypto : Prng 
  • branches/eraser6/pluginsRewrite/Eraser.Manager/Settings.cs

    r2369 r2373  
    3333namespace Eraser.Manager 
    3434{ 
    35     public abstract class SettingsManager 
    36     { 
    37         /// <summary> 
    38         /// Saves all the settings to persistent storage. 
    39         /// </summary> 
    40         public abstract void Save(); 
    41  
    42         /// <summary> 
    43         /// Gets the dictionary holding settings for the calling assembly. 
    44         /// </summary> 
    45         public Settings ModuleSettings 
    46         { 
    47             get 
    48             { 
    49                 return GetSettings(new Guid(((GuidAttribute)Assembly.GetCallingAssembly(). 
    50                     GetCustomAttributes(typeof(GuidAttribute), false)[0]).Value)); 
    51             } 
    52         } 
    53  
    54         /// <summary> 
    55         /// Gets the settings from the data source. 
    56         /// </summary> 
    57         /// <param name="value">The GUID of the calling plugin</param> 
    58         /// <returns>The Settings object which will act as the data store.</returns> 
    59         protected abstract Settings GetSettings(Guid value); 
    60     } 
    61  
    62     #region Default attributes 
    63     /// <summary> 
    64     /// Indicates that the marked class should be used as a default when no 
    65     /// settings have been set by the user. 
    66     /// </summary> 
    67     [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)] 
    68     public abstract class DefaultAttribute : Attribute 
    69     { 
    70         /// <summary> 
    71         /// Constructor. 
    72         /// </summary> 
    73         /// <param name="priority">The priority of the current element in terms of 
    74         /// it being the default.</param> 
    75         protected DefaultAttribute(int priority) 
    76         { 
    77             Priority = priority; 
    78         } 
    79  
    80         /// <summary> 
    81         /// The priority of the default. 
    82         /// </summary> 
    83         public int Priority 
    84         { 
    85             get 
    86             { 
    87                 return priority; 
    88             } 
    89             private set 
    90             { 
    91                 priority = value; 
    92             } 
    93         } 
    94  
    95         private int priority; 
    96     } 
    97  
    98     /// <summary> 
    99     /// Indicates that the marked class should be used as the default file erasure 
    100     /// method. 
    101     /// </summary> 
    102     [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)] 
    103     public sealed class DefaultFileErasureAttribute : DefaultAttribute 
    104     { 
    105         /// <summary> 
    106         /// Constructor. 
    107         /// </summary> 
    108         /// <param name="priority">The priority of the current element in terms of 
    109         /// it being the default.</param> 
    110         public DefaultFileErasureAttribute(int priority) 
    111             : base(priority) 
    112         { 
    113         } 
    114     } 
    115  
    116     /// <summary> 
    117     /// Indicates that the marked class should be used as the default unused space 
    118     /// erasure method. 
    119     /// </summary> 
    120     [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)] 
    121     public sealed class DefaultUnusedSpaceErasureAttribute : DefaultAttribute 
    122     { 
    123         /// <summary> 
    124         /// Constructor. 
    125         /// </summary> 
    126         /// <param name="priority">The priority of the current element in terms of 
    127         /// it being the default.</param> 
    128         public DefaultUnusedSpaceErasureAttribute(int priority) 
    129             : base(priority) 
    130         { 
    131         } 
    132     } 
    133  
    134     /// <summary> 
    135     /// Indicates that the marked class should be used as the default PRNG. 
    136     /// </summary> 
    137     [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)] 
    138     public sealed class DefaultPrngAttribute : DefaultAttribute 
    139     { 
    140         /// <summary> 
    141         /// Constructor. 
    142         /// </summary> 
    143         /// <param name="priority">The priority of the current element in terms of 
    144         /// it being the default.</param> 
    145         public DefaultPrngAttribute(int priority) 
    146             : base(priority) 
    147         { 
    148         } 
    149     } 
    150     #endregion 
    151  
    15235    /// <summary> 
    15336    /// Presents an opaque type for the management of the Manager settings. 
Note: See TracChangeset for help on using the changeset viewer.