Ignore:
Timestamp:
3/10/2012 1:32:51 PM (2 years ago)
Author:
lowjoel
Message:

Make all the plugin extension points interfaces. I'll move the rest of the code tomorrow.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/eraser6/pluginsRewrite/Eraser.Plugins/ExtensionPoints/IErasureMethod.cs

    r2405 r2439  
    3535    /// streams, not unused drive space. 
    3636    /// </summary> 
    37     public abstract class ErasureMethod : IRegisterable 
     37    public abstract class IErasureMethod : IRegisterable 
    3838    { 
    3939        public override string ToString() 
     
    100100        /// <param name="prng">The PRNG source for random data.</param> 
    101101        /// <param name="callback">The progress callback function.</param> 
    102         public abstract void Erase(Stream stream, long erasureLength, Prng prng, 
     102        public abstract void Erase(Stream stream, long erasureLength, IPrng prng, 
    103103            ErasureMethodProgressFunction callback); 
    104104 
     
    128128 
    129129            //Randomize. 
    130             Prng rand = Host.Instance.Prngs.ActivePrng; 
     130            IPrng rand = Host.Instance.Prngs.ActivePrng; 
    131131            for (int i = 0; i < result.Length; ++i) 
    132132            { 
     
    148148        public static void WriteRandom(byte[] buffer, object value) 
    149149        { 
    150             ((Prng)value).NextBytes(buffer); 
     150            ((IPrng)value).NextBytes(buffer); 
    151151        } 
    152152 
     
    182182    /// unused drive space. 
    183183    /// </summary> 
    184     public abstract class UnusedSpaceErasureMethod : ErasureMethod 
     184    public abstract class UnusedSpaceErasureMethod : IErasureMethod 
    185185    { 
    186186        /// <summary> 
     
    197197        /// <param name="prng">The PRNG source for random data.</param> 
    198198        /// <param name="callback">The progress callback function.</param> 
    199         public virtual void EraseUnusedSpace(Stream stream, Prng prng, ErasureMethodProgressFunction callback) 
     199        public virtual void EraseUnusedSpace(Stream stream, IPrng prng, ErasureMethodProgressFunction callback) 
    200200        { 
    201201            Erase(stream, long.MaxValue, prng, callback); 
     
    242242        } 
    243243 
    244         public override void Erase(Stream stream, long erasureLength, Prng prng, 
     244        public override void Erase(Stream stream, long erasureLength, IPrng prng, 
    245245            ErasureMethodProgressFunction callback) 
    246246        { 
     
    324324        /// <param name="buffer">The buffer to populate with the data to write.</param> 
    325325        /// <param name="prng">The PRNG used for random passes.</param> 
    326         public void Execute(byte[] buffer, Prng prng) 
     326        public void Execute(byte[] buffer, IPrng prng) 
    327327        { 
    328328            Function(buffer, OpaqueValue == null ? prng : OpaqueValue); 
Note: See TracChangeset for help on using the changeset viewer.