C# Class GSF.IO.Unmanaged.UnmanagedMemoryStreamCore

Provides a dynamically sizing sequence of unmanaged data.
Inheritance: IDisposable
Afficher le fichier Open project: GridProtectionAlliance/openHistorian

Méthodes publiques

Méthode Description
ConfigureAlignment ( long startPosition ) : void

Configure the natural alignment of the data.

ConfigureAlignment ( long startPosition, int alignment ) : void

Configure the natural alignment of the data.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetBlock ( BlockArguments args ) : void

Gets a block for the following Io session.

ReadBlock ( long position, IntPtr &pointer, int &validLength ) : void

Reads from the underlying stream the requested set of data. This function is more user friendly than calling GetBlock().

Méthodes protégées

Méthode Description
UnmanagedMemoryStreamCore ( int allocationSize = 4096 ) : System

Create a new UnmanagedMemoryStreamCore that allocates its own unmanaged memory.

Private Methods

Méthode Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the MemoryFile object and optionally releases the managed resources.

GetPage ( long position ) : IntPtr

Returns the page that corresponds to the absolute position. This function will also autogrow the stream.

IncreasePageCount ( int pageCount ) : void

Increases the size of the Memory Stream and updated the settings if needed

Method Details

ConfigureAlignment() public méthode

Configure the natural alignment of the data.
public ConfigureAlignment ( long startPosition ) : void
startPosition long The first addressable position
Résultat void

ConfigureAlignment() public méthode

Configure the natural alignment of the data.
public ConfigureAlignment ( long startPosition, int alignment ) : void
startPosition long The first addressable position
alignment int Forces alignment on this boundary. /// Alignment must be a factor of the BufferPool's page boudary.
Résultat void

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

GetBlock() public méthode

Gets a block for the following Io session.
public GetBlock ( BlockArguments args ) : void
args BlockArguments
Résultat void

ReadBlock() public méthode

Reads from the underlying stream the requested set of data. This function is more user friendly than calling GetBlock().
public ReadBlock ( long position, IntPtr &pointer, int &validLength ) : void
position long the starting position of the read
pointer System.IntPtr an output pointer to .
validLength int the number of bytes that are valid after this position.
Résultat void

UnmanagedMemoryStreamCore() protected méthode

Create a new UnmanagedMemoryStreamCore that allocates its own unmanaged memory.
protected UnmanagedMemoryStreamCore ( int allocationSize = 4096 ) : System
allocationSize int
Résultat System