/// <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(); }
protected virtual void Dispose(bool disposing) { if (!this.isDisposed) { if (disposing) { if (this.winPerfCounters != null) { this.winPerfCounters.Dispose(); this.winPerfCounters = null; } } this.isDisposed = true; } }
/// <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(); }