Class StorageBase
Inheritance
System.Object
StorageBase
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Bayat.SaveSystem.Runtime.dll
Syntax
public abstract class StorageBase : IStorage
Constructors
|
Improve this Doc
View Source
StorageBase()
Declaration
|
Improve this Doc
View Source
StorageBase(String)
Declaration
public StorageBase(string encodingName)
Parameters
Type |
Name |
Description |
System.String |
encodingName |
|
|
Improve this Doc
View Source
StorageBase(Encoding)
Declaration
public StorageBase(Encoding textEncoding)
Parameters
Type |
Name |
Description |
System.Text.Encoding |
textEncoding |
|
Fields
|
Improve this Doc
View Source
DefaultTextEncodingName
Declaration
public const string DefaultTextEncodingName = "utf-8"
Field Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
textEncoding
Declaration
protected Encoding textEncoding
Field Value
Type |
Description |
System.Text.Encoding |
|
|
Improve this Doc
View Source
useCatalog
Declaration
protected bool useCatalog
Field Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
protected bool useMetaData
Field Value
Type |
Description |
System.Boolean |
|
Properties
|
Improve this Doc
View Source
BackupSuffix
Declaration
public virtual string BackupSuffix { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
CatalogIdentifier
Declaration
public virtual string CatalogIdentifier { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
Declaration
public virtual string MetaSuffix { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
TextEncoding
Declaration
public virtual Encoding TextEncoding { get; set; }
Property Value
Type |
Description |
System.Text.Encoding |
|
|
Improve this Doc
View Source
UseCatalog
Declaration
public virtual bool UseCatalog { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public virtual bool UseMetaData { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
AddToCatalog(String)
Adds the new item to the catalog.
Declaration
protected virtual async Task AddToCatalog(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The item identifier
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Clear()
Declaration
public abstract Task<StorageClearOperationResult> Clear()
Returns
|
Improve this Doc
View Source
CommitWriteStream(IStorageStream)
Declaration
public virtual async Task CommitWriteStream(IStorageStream stream)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
CommitWriteStreamInternal(IStorageStream)
Commit the write stream internally without doing any other actions.
Declaration
protected abstract Task CommitWriteStreamInternal(IStorageStream stream)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Copy(String, String, Boolean)
Declaration
public virtual async Task<StorageCopyOperationResult> Copy(string fromIdentifier, string toIdentifier, bool replace)
Parameters
Type |
Name |
Description |
System.String |
fromIdentifier |
|
System.String |
toIdentifier |
|
System.Boolean |
replace |
|
Returns
|
Improve this Doc
View Source
CopyInternal(String, String, Boolean)
Copy the item internally without doing any other actions.
Declaration
protected abstract Task<StorageCopyOperationResult> CopyInternal(string fromIdentifier, string toIdentifier, bool replace)
Parameters
Type |
Name |
Description |
System.String |
fromIdentifier |
The item source identifier
|
System.String |
toIdentifier |
The item destination identifier
|
System.Boolean |
replace |
Replace the target item if exists or not
|
Returns
|
Improve this Doc
View Source
CreateBackup(String)
Declaration
public virtual async Task<StorageBackup> CreateBackup(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
|
Improve this Doc
View Source
Delete(String)
Declaration
public virtual async Task<StorageDeleteOperationResult> Delete(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
|
Improve this Doc
View Source
DeleteBackup(String, StorageBackup)
Declaration
public virtual async Task<StorageDeleteOperationResult> DeleteBackup(string identifier, StorageBackup backup)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
StorageBackup |
backup |
|
Returns
|
Improve this Doc
View Source
DeleteBackups(String)
Declaration
public virtual async Task<bool> DeleteBackups(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
|
Improve this Doc
View Source
DeleteInternal(String)
Delete the specified item internally without doing any other actions.
Declaration
protected abstract Task<StorageDeleteOperationResult> DeleteInternal(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The itme identifier
|
Returns
|
Improve this Doc
View Source
Declaration
public virtual async Task<StorageDeleteOperationResult> DeleteMetaData(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
|
Improve this Doc
View Source
Exists(String)
Declaration
public abstract Task<bool> Exists(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
|
Improve this Doc
View Source
GetBackups(String)
Declaration
public virtual async Task<List<StorageBackup>> GetBackups(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<StorageBackup>> |
|
|
Improve this Doc
View Source
GetLatestBackup(String)
Declaration
public virtual async Task<StorageBackup> GetLatestBackup(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
|
Improve this Doc
View Source
Gets the meta identifier using the specified item identifier or returns the identifier itself if it is a meta identifier already.
Declaration
protected virtual string GetMetaIdentifier(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The item identifier
|
Returns
Type |
Description |
System.String |
The meta identifier of the specified item identifier
|
|
Improve this Doc
View Source
GetReadStream(String)
Declaration
public abstract Task<IStorageStream> GetReadStream(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
|
Improve this Doc
View Source
GetWriteStream(String)
Declaration
public abstract Task<IStorageStream> GetWriteStream(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
|
Improve this Doc
View Source
Declaration
public virtual Task<bool> HasMetaData(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
|
Improve this Doc
View Source
IsCatalogIdentifier(String)
Checks whether the specified identifier is catalog identifier or not.
Declaration
protected virtual bool IsCatalogIdentifier(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The item identifier
|
Returns
Type |
Description |
System.Boolean |
True if the identifier is catalog identifier otherwise false
|
|
Improve this Doc
View Source
Checks whether the specified identifier is meta or not.
Declaration
protected virtual bool IsMetaIdentifier(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The identifier
|
Returns
Type |
Description |
System.Boolean |
True if the identifier is meta otherwise false
|
|
Improve this Doc
View Source
List(String, StorageListOptions)
Declaration
public abstract Task<string[]> List(string identifier, StorageListOptions options)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String[]> |
|
|
Improve this Doc
View Source
ListAll()
Declaration
public abstract Task<string[]> ListAll()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String[]> |
|
|
Improve this Doc
View Source
LoadCatalog()
Declaration
public virtual async Task<List<string>> LoadCatalog()
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<System.String>> |
|
|
Improve this Doc
View Source
Declaration
public virtual async Task<StorageMetaData> LoadMetaData(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
|
Improve this Doc
View Source
Move(String, String, Boolean)
Declaration
public virtual async Task<StorageMoveOperationResult> Move(string oldIdentifier, string newIdentifier, bool replace)
Parameters
Type |
Name |
Description |
System.String |
oldIdentifier |
|
System.String |
newIdentifier |
|
System.Boolean |
replace |
|
Returns
|
Improve this Doc
View Source
MoveInternal(String, String, Boolean)
Move the item internally without doing any other actions.
Declaration
protected abstract Task<StorageMoveOperationResult> MoveInternal(string oldIdentifier, string newIdentifier, bool replace)
Parameters
Type |
Name |
Description |
System.String |
oldIdentifier |
The old item identifier
|
System.String |
newIdentifier |
The new item identifier
|
System.Boolean |
replace |
Replace the target item if exists or not
|
Returns
|
Improve this Doc
View Source
ReadAllBytes(String)
Declaration
public abstract Task<byte[]> ReadAllBytes(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Byte[]> |
|
|
Improve this Doc
View Source
ReadAllText(String)
Declaration
public abstract Task<string> ReadAllText(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
|
Improve this Doc
View Source
RemoveFromCatalog(String)
Removes the item from the catalog.
Declaration
protected virtual async Task RemoveFromCatalog(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The item identifier
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
RenameInCatalog(String, String)
Renames the item in the catalog.
Declaration
protected virtual async Task RenameInCatalog(string oldIdentifier, string newIdentifier)
Parameters
Type |
Name |
Description |
System.String |
oldIdentifier |
|
System.String |
newIdentifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
RestoreBackup(String, StorageBackup)
Declaration
public virtual async Task<bool> RestoreBackup(string identifier, StorageBackup backup)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
StorageBackup |
backup |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
|
Improve this Doc
View Source
RestoreLatestBackup(String)
Declaration
public virtual async Task<bool> RestoreLatestBackup(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
|
Improve this Doc
View Source
SaveCatalog(List<String>)
Declaration
public virtual Task SaveCatalog(List<string> catalog)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.String> |
catalog |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Declaration
public virtual Task SaveMetaData(string identifier, StorageMetaData metaData)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Declaration
public virtual async Task UpdateMetaData(string identifier, bool isWrite, bool encrypted)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.Boolean |
isWrite |
|
System.Boolean |
encrypted |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
WriteAllBytes(String, Byte[])
Declaration
public virtual async Task WriteAllBytes(string identifier, byte[] data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.Byte[] |
data |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
WriteAllBytesInternal(String, Byte[])
Write all binary data internally without doing any other actions.
Declaration
protected abstract Task WriteAllBytesInternal(string identifier, byte[] data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The item identifier
|
System.Byte[] |
data |
The binary data
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
WriteAllText(String, String)
Declaration
public virtual async Task WriteAllText(string identifier, string data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
System.String |
data |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
WriteAllTextInternal(String, String)
Write all the text data internally without doing any other actions.
Declaration
protected abstract Task WriteAllTextInternal(string identifier, string data)
Parameters
Type |
Name |
Description |
System.String |
identifier |
The item identifier
|
System.String |
data |
The text data
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Implements