Ignore:
Timestamp:
5/1/2009 2:17:00 AM (5 years ago)
Author:
lowjoel
Message:

Reduce code verbosity by using automatic properties.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/Task.cs

    r938 r942  
    934934            : base(task) 
    935935        { 
     936            CurrentItemPass = 1; 
    936937        } 
    937938 
     
    947948        /// The amount of time left for the operation to complete, in seconds. 
    948949        /// </summary> 
    949         public TimeSpan TimeLeft 
    950         { 
    951             get { return timeLeft; } 
    952             internal set { timeLeft = value; } 
    953         } 
     950        public TimeSpan TimeLeft { get; internal set; } 
    954951 
    955952        /// <summary> 
    956953        /// The current erasure target - the current item being erased. 
    957954        /// </summary> 
    958         public ErasureTarget CurrentTarget 
    959         { 
    960             get { return currentTarget; } 
    961             internal set { currentTarget = value; } 
    962         } 
     955        public ErasureTarget CurrentTarget { get; internal set; } 
    963956 
    964957        /// <summary> 
    965958        /// The current index of the target. 
    966959        /// </summary> 
    967         public int CurrentTargetIndex 
    968         { 
    969             get { return currentTargetIndex; } 
    970             internal set { currentTargetIndex = value; } 
    971         } 
     960        public int CurrentTargetIndex { get; internal set; } 
    972961 
    973962        /// <summary> 
     
    975964        /// completed. 
    976965        /// </summary> 
    977         public int CurrentTargetTotalPasses 
    978         { 
    979             get { return currentTargetTotalPasses; } 
    980             internal set { currentTargetTotalPasses = value; } 
    981         } 
     966        public int CurrentTargetTotalPasses { get; internal set; } 
    982967 
    983968        /// <summary> 
    984969        /// A number from 0 to 1 detailing the overall progress of the item. 
    985970        /// </summary> 
    986         public float CurrentItemProgress 
    987         { 
    988             get { return currentItemProgress; } 
    989             internal set { currentItemProgress = value; } 
    990         } 
     971        public float CurrentItemProgress { get; internal set; } 
    991972 
    992973        /// <summary> 
    993974        /// The file name of the item being erased. 
    994975        /// </summary> 
    995         public string CurrentItemName 
    996         { 
    997             get { return currentItemName; } 
    998             internal set { currentItemName = value; } 
    999         } 
     976        public string CurrentItemName { get; internal set; } 
    1000977 
    1001978        /// <summary> 
    1002979        /// The pass number of a multi-pass erasure method. 
    1003980        /// </summary> 
    1004         public int CurrentItemPass 
    1005         { 
    1006             get { return currentItemPass; } 
    1007             internal set { currentItemPass = value; } 
    1008         } 
     981        public int CurrentItemPass { get; internal set; } 
    1009982 
    1010983        /// <summary> 
     
    1022995 
    1023996        private float overallProgress; 
    1024         private TimeSpan timeLeft = new TimeSpan(0, 0, -1); 
    1025  
    1026         private ErasureTarget currentTarget; 
    1027         private int currentTargetIndex; 
    1028         private int currentTargetTotalPasses; 
    1029  
    1030         private float currentItemProgress; 
    1031         private string currentItemName; 
    1032         private int currentItemPass = 1; 
    1033997    } 
    1034998} 
Note: See TracChangeset for help on using the changeset viewer.