Class Partition
Partition class. Used to read and write blocks of data.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Cosmos.HAL.BlockDevice
Assembly: Cosmos.HAL2.dll
Syntax
public class Partition : BlockDevice
Constructors
| Improve this Doc View SourcePartition(BlockDevice, UInt64, UInt64)
Create new instance of the Partition class.
Declaration
public Partition(BlockDevice aHost, ulong StartingSector, ulong SectorCount)
Parameters
Type | Name | Description |
---|---|---|
BlockDevice | aHost | A hosting device. |
System.UInt64 | StartingSector | |
System.UInt64 | SectorCount |
Fields
| Improve this Doc View SourceHost
Hosting device.
Declaration
public readonly BlockDevice Host
Field Value
Type | Description |
---|---|
BlockDevice |
Partitions
Declaration
public static List<Partition> Partitions
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<Partition> |
StartingSector
Starting sector.
Declaration
public readonly ulong StartingSector
Field Value
Type | Description |
---|---|
System.UInt64 |
Properties
| Improve this Doc View SourceType
Declaration
public override BlockDeviceType Type { get; }
Property Value
Type | Description |
---|---|
BlockDeviceType |
Overrides
Methods
| Improve this Doc View SourceReadBlock(UInt64, UInt64, ref Byte[])
Read block from partition.
Declaration
public override void ReadBlock(ulong aBlockNo, ulong aBlockCount, ref byte[] aData)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | aBlockNo | A block to read from. |
System.UInt64 | aBlockCount | A number of blocks in the partition. |
System.Byte[] | aData | A data that been read. |
Overrides
Exceptions
Type | Condition |
---|---|
System.OverflowException | Thrown when data lenght is greater then Int32.MaxValue. |
System.Exception | Thrown when data size invalid. |
ToString()
To string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | string value. |
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
WriteBlock(UInt64, UInt64, ref Byte[])
Write block to partition.
Declaration
public override void WriteBlock(ulong aBlockNo, ulong aBlockCount, ref byte[] aData)
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | aBlockNo | A block number to write to. |
System.UInt64 | aBlockCount | A number of blocks in the partition. |
System.Byte[] | aData | A data to write. |
Overrides
Exceptions
Type | Condition |
---|---|
System.OverflowException | Thrown when data lenght is greater then Int32.MaxValue. |
System.Exception | Thrown when data size invalid. |