DynamicDiskHelper.cs 993 B

1234567891011121314151617181920212223242526272829303132
  1. /* Copyright (C) 2014-2016 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.IO;
  10. using System.Text;
  11. using Utilities;
  12. namespace DiskAccessLibrary.LogicalDiskManager
  13. {
  14. public partial class DynamicDiskHelper
  15. {
  16. public static DynamicDisk FindDisk(List<DynamicDisk> disks, Guid diskGuid)
  17. {
  18. foreach (DynamicDisk dynamicDisk in disks)
  19. {
  20. if (dynamicDisk != null)
  21. {
  22. if (dynamicDisk.DiskGuid == diskGuid)
  23. {
  24. return dynamicDisk;
  25. }
  26. }
  27. }
  28. return null;
  29. }
  30. }
  31. }