Table of Contents

Interface IBufferProvider

Namespace
ReFuel.Resources
Assembly
ReFuel.dll

Interface for resource buffer providers.

public interface IBufferProvider : IDisposable
Inherited Members

Properties

IsReadOnly

True if the buffer is read only.

bool IsReadOnly { get; }

Property Value

bool

Size

Size of the buffer in bytes.

int Size { get; }

Property Value

int

Methods

Acquire(bool, TimeSpan?)

Acquire a lock to this buffer provider.

BufferLock Acquire(bool isReadonly = true, TimeSpan? timeout = null)

Parameters

isReadonly bool

True for a readonly lock.

timeout TimeSpan?

Lock acquire time out.

Returns

BufferLock

The lock instance if successfull.

CopyTo(IBufferProvider, TimeSpan?)

Copy this buffer contents to another buffer.

void CopyTo(IBufferProvider destination, TimeSpan? timeout = null)

Parameters

destination IBufferProvider

The destination buffer.

timeout TimeSpan?

Lock acquire time out.

TryAcquire(out BufferLock, bool, TimeSpan?)

Try to acquire a lock to this buffer provider.

bool TryAcquire(out BufferLock @lock, bool isReadonly = true, TimeSpan? timeout = null)

Parameters

lock BufferLock

The lock object, when true.

isReadonly bool

True if for a readonly lock.

timeout TimeSpan?

Lock acquire time out.

Returns

bool

True if the lock was acquired.