C# Класс DBreeze.Storage.MemoryStorage

Memory storage
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Clear ( bool withInternalArrayResize ) : void

Sets EOF pointer to 0.

USE withInternalArrayResize by necessity. If it's true then array will be re-initialized to initial capacity

this also will call GC and the whole process will take some time.

If false, only pointer EOF will be set to 0, capacity of the array will not be changed - very fast

Dispose ( ) : void
GetFullData ( ) : byte[]

Can return null

MemoryStorage ( int initialCapacity, int increaseOnBytes, eMemoryExpandStartegy strategy ) : System

Read ( int offset, int length ) : byte[]

If length = 0 returns new byte[0]

Write_ByOffset ( int offset, byte &data ) : void

Write_ToTheEnd ( byte &data ) : int

Writes_ByOffsets ( byte[]>.Dictionary datas ) : void

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

Метод Описание
Resize ( int upTo ) : void
Write ( byte data, int offset ) : void

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

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

Sets EOF pointer to 0.

USE withInternalArrayResize by necessity. If it's true then array will be re-initialized to initial capacity

this also will call GC and the whole process will take some time.

If false, only pointer EOF will be set to 0, capacity of the array will not be changed - very fast

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

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

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

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

Can return null
public GetFullData ( ) : byte[]
Результат byte[]

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

public MemoryStorage ( int initialCapacity, int increaseOnBytes, eMemoryExpandStartegy strategy ) : System
initialCapacity int Initial Memory Capacity in bytes
increaseOnBytes int Rules is strategy is FIXED_LENGTH_INCREASE, quantity of bytes to increse memory
strategy eMemoryExpandStartegy Memory expand strategy
Результат System

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

If length = 0 returns new byte[0]
public Read ( int offset, int length ) : byte[]
offset int
length int
Результат byte[]

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

public Write_ByOffset ( int offset, byte &data ) : void
offset int
data byte
Результат void

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

public Write_ToTheEnd ( byte &data ) : int
data byte
Результат int

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

public Writes_ByOffsets ( byte[]>.Dictionary datas ) : void
datas byte[]>.Dictionary
Результат void