BinaryDataStorageManager
Namespace: TagBites.IO.Storages
Assembly: TagBites.IO.dll
Provides a manager functionality for TagBites.IO.Storages.IBinaryDataStorage objects.
public class BinaryDataStorageManager
Constructors
BinaryDataStorageManager()
public void BinaryDataStorageManager()
Result Type: void
Methods
CreateDefault(Stream)
Creates a default storage for specified stream.
public string CreateDefault(Stream data)
Result Type: string
Parameters
Type | Name | |
---|---|---|
Stream | data | The stream for writing data. |
Delete(string)
Deletes a data related to the specific content path in the storage associated with prefix.
public void Delete(string contentPathWithStoragePrefix)
Result Type: void
Parameters
Type | Name | |
---|---|---|
string | contentPathWithStoragePrefix | The content path with storage prefix. |
Read(string)
Reads a data related to the specific content path in the storage associated with prefix.
public Stream Read(string contentPathWithStoragePrefix)
Result Type: Stream
Parameters
Type | Name | |
---|---|---|
string | contentPathWithStoragePrefix | The path to the content with storage prefix. |
RegisterStorage(string, IBinaryDataStorage)
Registers the specified binary data storage for defined prefix.
public void RegisterStorage(string prefix, IBinaryDataStorage storage)
Result Type: void
Parameters
Type | Name | |
---|---|---|
string | prefix | The prefix for the . |
IBinaryDataStorage | storage | A object providing read, write and delete operations. |
Write(string, Stream)
Writes a data related to the specific content path in the storage associated with prefix.
public string Write(string contentPathWithStoragePrefix, Stream data)
Result Type: string
Parameters
Type | Name | |
---|---|---|
string | contentPathWithStoragePrefix | The content path with storage prefix. |
Stream | data | The stream from which the content is written. |