Interface IOdbBackend
Base class for custom object database backends (ODB).
public interface IOdbBackend : IDisposable- Inherited Members
- Extension Methods
Properties
ContentIndexMap
Gets the asset index map.
IContentIndexMap ContentIndexMap { get; }Property Value
- IContentIndexMap
- The asset index map. 
Methods
CreateStream()
Creates a stream that will be saved to database when closed and/or disposed.
OdbStreamWriter CreateStream()Returns
- OdbStreamWriter
- a stream writer that should be passed to SaveStream in order to be stored in the database 
Delete(ObjectId)
Deletes the specified ObjectId.
void Delete(ObjectId objectId)Parameters
- objectIdObjectId
- The object id. 
EnumerateObjects()
Enumerates the object stored in this backend.
IEnumerable<ObjectId> EnumerateObjects()Returns
Exists(ObjectId)
Determines weither the object with the specified ObjectId exists.
bool Exists(ObjectId objectId)Parameters
Returns
GetFilePath(ObjectId)
Returns the file path corresponding to the given id (in the VFS domain), if appliable.
string GetFilePath(ObjectId objectId)Parameters
Returns
- string
- The file path. 
GetSize(ObjectId)
Requests that this backend read an object's length (but not its contents).
int GetSize(ObjectId objectId)Parameters
Returns
- int
- The object size. 
OpenStream(ObjectId, VirtualFileMode, VirtualFileAccess, VirtualFileShare)
Stream OpenStream(ObjectId objectId, VirtualFileMode mode = VirtualFileMode.Open, VirtualFileAccess access = VirtualFileAccess.Read, VirtualFileShare share = VirtualFileShare.Read)Parameters
- objectIdObjectId
- The ObjectId. 
- modeVirtualFileMode
- The mode. 
- accessVirtualFileAccess
- The access. 
- shareVirtualFileShare
- The process share mode. 
Returns
Write(ObjectId, Stream, int, bool)
Writes an object to the backing store. The backend may need to compute the object ID and return it to the caller.
ObjectId Write(ObjectId objectId, Stream dataStream, int length, bool forceWrite = false)Parameters
- objectIdObjectId
- The ObjectId if already computed, or Empty if not determined yet. 
- dataStreamStream
- The data stream. 
- lengthint
- The data length. 
- forceWritebool
- Set to true to force writing the datastream even if a content is already stored with the same id. Default is false.