C# Класс GSF.IO.FileStructure.Media.DiskIoSession

Provides a data IO session with the disk subsystem to perform basic read and write operations.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CachedLookups long
Lookups long

Открытые методы

Метод Описание
Clear ( ) : void
DiskIoSession ( DiskIo diskIo, BinaryStreamIoSessionBase ioSession, FileHeaderBlock header, SubFileHeader file ) : System

Creates a new DiskIoSession that can be used to read from the disk subsystem.

Dispose ( ) : void

Releases all the resources used by the DiskIoSession object.

Read ( uint blockIndex, BlockType blockType, uint indexValue ) : void

Navigates to a block that will be only read and not modified.

ReadOld ( uint blockIndex, BlockType blockType, uint indexValue ) : void

Navigates to a block that will be only read and not modified.

WriteToExistingBlock ( uint blockIndex, BlockType blockType, uint indexValue ) : void

Navigates to a block that will be written to. This block must currently exist and have the correct parameters passed to this function In order to allow this block to be modified.

WriteToNewBlock ( uint blockIndex, BlockType blockType, uint indexValue ) : void

Navigates to a block that will be written to. This class does not check if overwriting an existing block. So be careful not to corrupt the file.

This function will increase the size of the file if the block excedes the current size of the file.

Приватные методы

Метод Описание
ClearFooterData ( ) : void
IsFooterCurrentSnapshotAndValid ( ) : IoReadState
IsFooterValid ( ) : IoReadState
IsFooterValidFromOldBlock ( ) : IoReadState
ReadBlock ( bool requestWriteAccess ) : void

Tries to read data from the following file

WriteFooterData ( ) : void

Описание методов

Clear() публичный Метод

public Clear ( ) : void
Результат void

DiskIoSession() публичный Метод

Creates a new DiskIoSession that can be used to read from the disk subsystem.
public DiskIoSession ( DiskIo diskIo, BinaryStreamIoSessionBase ioSession, FileHeaderBlock header, SubFileHeader file ) : System
diskIo DiskIo owner of the disk
ioSession GSF.IO.Unmanaged.BinaryStreamIoSessionBase the base ioSession to use for this io session
header FileHeaderBlock
file SubFileHeader The file that will be read from this diskIoSession
Результат System

Dispose() публичный Метод

Releases all the resources used by the DiskIoSession object.
public Dispose ( ) : void
Результат void

Read() публичный Метод

Navigates to a block that will be only read and not modified.
public Read ( uint blockIndex, BlockType blockType, uint indexValue ) : void
blockIndex uint
blockType BlockType the type of this block.
indexValue uint a value put in the footer of the block designating the index of this block
Результат void

ReadOld() публичный Метод

Navigates to a block that will be only read and not modified.
public ReadOld ( uint blockIndex, BlockType blockType, uint indexValue ) : void
blockIndex uint
blockType BlockType the type of this block.
indexValue uint a value put in the footer of the block designating the index of this block
Результат void

WriteToExistingBlock() публичный Метод

Navigates to a block that will be written to. This block must currently exist and have the correct parameters passed to this function In order to allow this block to be modified.
public WriteToExistingBlock ( uint blockIndex, BlockType blockType, uint indexValue ) : void
blockIndex uint the index value of this block
blockType BlockType the type of this block.
indexValue uint a value put in the footer of the block designating the index of this block
Результат void

WriteToNewBlock() публичный Метод

Navigates to a block that will be written to. This class does not check if overwriting an existing block. So be careful not to corrupt the file.
This function will increase the size of the file if the block excedes the current size of the file.
public WriteToNewBlock ( uint blockIndex, BlockType blockType, uint indexValue ) : void
blockIndex uint the index value of this block
blockType BlockType the type of this block.
indexValue uint a value put in the footer of the block designating the index of this block
Результат void

Описание свойств

CachedLookups публичное статическое свойство

public static long CachedLookups
Результат long

Lookups публичное статическое свойство

public static long Lookups
Результат long