Skip to content
Auto
Products

BinaryDataStorageManager

Namespace: TagBites.IO.Storages
Assembly: TagBites.IO.dll
Product: TagBites.IO v. 2.0.0

Provides a manager functionality for IBinaryDataStorage objects.

public class BinaryDataStorageManager

Inheritance: object → BinaryDataStorageManager

public BinaryDataStorageManager()

Gets the list of registered storages.

public IList<BinaryDataStorageInfo> Storages { get; }

IList<BinaryDataStorageInfo>

Deletes the data from storage related to resource content path.

public bool Delete(IFileResourceLink resource)

bool

Deletes the data from storage related to content path.

public bool Delete(string contentPath)
  • contentPath string
    The content path.

bool

Gets a current storage for the specified resource.

public BinaryDataStorageInfo GetCurrentStorage(IFileResourceLink resource)

BinaryDataStorageInfo

A BinaryDataStorageInfo representing the preferred storage.

Gets a preferred storage for the specified resource.

public virtual BinaryDataStorageInfo GetPreferredStorage(IFileResourceLink resource)

BinaryDataStorageInfo

A BinaryDataStorageInfo representing the preferred storage.

Reads the data from storage related to resource content path.

public Stream Read(IFileResourceLink resource)

Stream

A Stream object representing a read-only stream for the specified resource or

null

.

Reads the data from storage related to resource content path.

public Stream Read(string contentPath)
  • contentPath string
    The content path.

Stream

A Stream object representing a read-only stream for the specified contentPath or

null

.

RegisterStorage(string, IBinaryDataStorage)

Section titled “RegisterStorage(string, IBinaryDataStorage)”

Registers the specified binary data storage for defined prefix.

public void RegisterStorage(string prefix, IBinaryDataStorage storage)

Writes the data to preferred storage.

public string Write(IFileResourceLink resource, Stream data)

string

A String representing a content path to written data.