MBRPartition.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright (C) 2014 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.Text;
  10. using Utilities;
  11. namespace DiskAccessLibrary
  12. {
  13. public class MBRPartition : Partition
  14. {
  15. private byte m_partitionType;
  16. public MBRPartition(byte partitionType, DiskExtent extent) : base(extent)
  17. {
  18. m_partitionType = partitionType;
  19. }
  20. public MBRPartition(byte partitionType, Disk disk, long firstSector, long size) : base(disk, firstSector, size)
  21. {
  22. m_partitionType = partitionType;
  23. }
  24. public PartitionTypeName PartitionTypeName
  25. {
  26. get
  27. {
  28. return (PartitionTypeName)m_partitionType;
  29. }
  30. }
  31. }
  32. }