Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DiskUsage"/> class.
        /// </summary>
        public DiskUsage()
        {
            var driveLetter = Environment.CurrentDirectory.Substring(0, 2);

            this.Drive           = driveLetter;
            this.winPerfCounters = new WindowsPerfCounters();
        }
Exemplo n.º 2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!this.isDisposed)
            {
                if (disposing)
                {
                    if (this.winPerfCounters != null)
                    {
                        this.winPerfCounters.Dispose();
                        this.winPerfCounters = null;
                    }
                }

                this.isDisposed = true;
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DiskUsage"/> class.
 /// </summary>
 /// <param name="driveLetter">Drive letter.</param>
 public DiskUsage(string driveLetter)
 {
     this.Drive           = driveLetter;
     this.winPerfCounters = new WindowsPerfCounters();
 }