Class SaveSystemAPI
The Save System Unified Facade API class.
Inheritance
Inherited Members
Namespace: Bayat.SaveSystem
Assembly: Bayat.SaveSystem.Runtime.dll
Syntax
public static class SaveSystemAPI
Methods
| Improve this Doc View SourceClearAsync()
Clears items available in the storage using the default settings.
Declaration
public static Task<StorageClearOperationResult> ClearAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageClearOperationResult> | True if operation was successful otherwise false |
ClearAsync(SaveSystemSettings)
Clears items available in the storage.
Declaration
public static Task<StorageClearOperationResult> ClearAsync(SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageClearOperationResult> | True if operation was successful otherwise false |
ClearAsync(IStorage)
Clears items available in the storage.
Declaration
public static Task<StorageClearOperationResult> ClearAsync(IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageClearOperationResult> | True if operation was successful otherwise false |
CopyAsync(String, String, Boolean)
Copies the storage item to a new location using the default settings.
Declaration
public static Task<StorageCopyOperationResult> CopyAsync(string fromIdentifier, string toIdentifier, bool replace)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fromIdentifier | The storage item source location |
| System.String | toIdentifier | The storage item destination location |
| System.Boolean | replace | Replace the destination item if exists |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageCopyOperationResult> | True if operation was successful otherwise false |
CopyAsync(String, String, Boolean, SaveSystemSettings)
Copies the storage item to a new location.
Declaration
public static Task<StorageCopyOperationResult> CopyAsync(string fromIdentifier, string toIdentifier, bool replace, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fromIdentifier | The storage item source location |
| System.String | toIdentifier | The storage item destination location |
| System.Boolean | replace | Replace the destination item if exists |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageCopyOperationResult> | True if operation was successful otherwise false |
CopyAsync(String, String, Boolean, IStorage)
Copies the storage item to a new location.
Declaration
public static Task<StorageCopyOperationResult> CopyAsync(string fromIdentifier, string toIdentifier, bool replace, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fromIdentifier | The storage item source location |
| System.String | toIdentifier | The storage item destination location |
| System.Boolean | replace | Replace the destination item if exists |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageCopyOperationResult> | True if operation was successful otherwise false |
CreateBackupAsync(String)
Creates a new backup for the storage item using the default settings.
Declaration
public static Task<StorageBackup> CreateBackupAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageBackup> | The created backup information StorageBackup |
CreateBackupAsync(String, SaveSystemSettings)
Creates a new backup for the storage item.
Declaration
public static Task<StorageBackup> CreateBackupAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageBackup> | The created backup information StorageBackup |
CreateBackupAsync(String, IStorage)
Creates a new backup for the storage item.
Declaration
public static Task<StorageBackup> CreateBackupAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageBackup> | The created backup information StorageBackup |
DeleteAsync(String)
Deletes the storage item using the default settings.
Declaration
public static Task<StorageDeleteOperationResult> DeleteAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageDeleteOperationResult> | True if operation was successful otherwise false |
DeleteAsync(String, SaveSystemSettings)
Deletes the storage item.
Declaration
public static Task<StorageDeleteOperationResult> DeleteAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageDeleteOperationResult> | True if operation was successful otherwise false |
DeleteAsync(String, IStorage)
Deletes the storage item.
Declaration
public static Task<StorageDeleteOperationResult> DeleteAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageDeleteOperationResult> | True if operation was successful otherwise false |
DeleteBackupAsync(String, StorageBackup)
Deletes the backup for the stroage item using the default settings.
Declaration
public static Task<StorageDeleteOperationResult> DeleteBackupAsync(string identifier, StorageBackup backup)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| StorageBackup | backup | The storage backup information |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageDeleteOperationResult> | True if operation was successful otherwise false |
DeleteBackupAsync(String, StorageBackup, SaveSystemSettings)
Deletes the backup for the stroage item.
Declaration
public static Task<StorageDeleteOperationResult> DeleteBackupAsync(string identifier, StorageBackup backup, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| StorageBackup | backup | The storage backup information |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageDeleteOperationResult> | True if operation was successful otherwise false |
DeleteBackupAsync(String, StorageBackup, IStorage)
Deletes the backup for the stroage item.
Declaration
public static Task<StorageDeleteOperationResult> DeleteBackupAsync(string identifier, StorageBackup backup, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| StorageBackup | backup | The storage backup information |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageDeleteOperationResult> | True if operation was successful otherwise false |
DeleteBackupsAsync(String)
Deletes all the backups for the storage item using the default settings.
Declaration
public static Task<bool> DeleteBackupsAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier to delete backups |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
DeleteBackupsAsync(String, SaveSystemSettings)
Deletes all the backups for the storage item.
Declaration
public static Task<bool> DeleteBackupsAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier to delete backups |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
DeleteBackupsAsync(String, IStorage)
Deletes all the backups for the storage item.
Declaration
public static Task<bool> DeleteBackupsAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier to delete backups |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
ExistsAsync(String)
Checks whether the storage item exists or not using the default settings.
Declaration
public static Task<bool> ExistsAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if storage item exists otherwise false |
ExistsAsync(String, SaveSystemSettings)
Checks whether the storage item exists or not.
Declaration
public static Task<bool> ExistsAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if storage item exists otherwise false |
ExistsAsync(String, IStorage)
Checks whether the storage item exists or not.
Declaration
public static Task<bool> ExistsAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if storage item exists otherwise false |
GetBackupsAsync(String)
Gets the backups for the storage item using the default settings.
Declaration
public static Task<List<StorageBackup>> GetBackupsAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<StorageBackup>> | The backups information StorageBackup |
GetBackupsAsync(String, SaveSystemSettings)
Gets the backups for the storage item.
Declaration
public static Task<List<StorageBackup>> GetBackupsAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<StorageBackup>> | The backups information StorageBackup |
GetBackupsAsync(String, IStorage)
Gets the backups for the storage item.
Declaration
public static Task<List<StorageBackup>> GetBackupsAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<StorageBackup>> | The backups information StorageBackup |
GetLatestBackupAsync(String)
Gets the latest backup for the storage item using the default settings.
Declaration
public static Task<StorageBackup> GetLatestBackupAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageBackup> | The created backup information StorageBackup |
GetLatestBackupAsync(String, SaveSystemSettings)
Gets the latest backup for the storage item.
Declaration
public static Task<StorageBackup> GetLatestBackupAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageBackup> | The created backup information StorageBackup |
GetLatestBackupAsync(String, IStorage)
Gets the latest backup for the storage item.
Declaration
public static Task<StorageBackup> GetLatestBackupAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageBackup> | The latest backup information StorageBackup |
HasMetaDataAsync(String)
Checks whether the storage item meta data exists or not using the default settings.
Declaration
public static Task<bool> HasMetaDataAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if storage item meta data exists otherwise false |
HasMetaDataAsync(String, SaveSystemSettings)
Checks whether the storage item meta data exists or not.
Declaration
public static Task<bool> HasMetaDataAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if storage item meta data exists otherwise false |
HasMetaDataAsync(String, IStorage)
Checks whether the storage item meta data exists or not.
Declaration
public static Task<bool> HasMetaDataAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if storage item meta data exists otherwise false |
ListAllAsync()
Lists all items in the storage.
Declaration
public static Task<string[]> ListAllAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String[]> | An array of items available in storage |
ListAllAsync(SaveSystemSettings)
Lists all items in the storage.
Declaration
public static Task<string[]> ListAllAsync(SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String[]> | An array of items available in storage |
ListAllAsync(IStorage)
Lists all items in the storage.
Declaration
public static Task<string[]> ListAllAsync(IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String[]> | An array of items available in storage |
ListAsync(String, StorageListOptions)
Lists storage items at the specified location using the default settings.
Declaration
public static Task<string[]> ListAsync(string identifier, StorageListOptions listOptions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage location |
| StorageListOptions | listOptions | The listing options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String[]> | An array of items available at the location |
ListAsync(String, StorageListOptions, SaveSystemSettings)
Lists storage items at the specified location.
Declaration
public static Task<string[]> ListAsync(string identifier, StorageListOptions listOptions, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage location |
| StorageListOptions | listOptions | The listing options |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String[]> | An array of items available at the location |
ListAsync(String, StorageListOptions, IStorage)
Lists storage items at the specified location.
Declaration
public static Task<string[]> ListAsync(string identifier, StorageListOptions listOptions, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage location |
| StorageListOptions | listOptions | The listing options |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String[]> | An array of items available at the location |
LoadAsync(String, Type)
Loads the serialized data from the storage item and deserializes the object using the default settings.
Declaration
public static Task<object> LoadAsync(string identifier, Type objectType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Type | objectType | The object type |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Object> | The deserialized object |
LoadAsync(String, Type, SaveSystemSettings)
Loads the serialized data from the storage item and deserializes the object.
Declaration
public static Task<object> LoadAsync(string identifier, Type objectType, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Type | objectType | The object type |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Object> | The deserialized object |
LoadAsync(String, Type, IStorage, SaveSystemJsonSerializer, Boolean, ISaveSystemEncryption, String)
Loads the serialized data from the storage item and deserializes the object.
Declaration
public static async Task<object> LoadAsync(string identifier, Type objectType, IStorage storage, SaveSystemJsonSerializer serializer, bool useEncryption, ISaveSystemEncryption encryption, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Type | objectType | The object type |
| IStorage | storage | The storage |
| SaveSystemJsonSerializer | serializer | The serializer |
| System.Boolean | useEncryption | |
| ISaveSystemEncryption | encryption | |
| System.String | password |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Object> | The deserialized object |
LoadAsync<T>(String)
Loads the serialized data from the storage item and deserializes the object using the default settings.
Declaration
public static Task<T> LoadAsync<T>(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | The deserialized object |
Type Parameters
| Name | Description |
|---|---|
| T |
LoadAsync<T>(String, SaveSystemSettings)
Loads the serialized data from the storage item and deserializes the object.
Declaration
public static Task<T> LoadAsync<T>(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | The deserialized object |
Type Parameters
| Name | Description |
|---|---|
| T |
LoadAsync<T>(String, IStorage, SaveSystemJsonSerializer, Boolean, ISaveSystemEncryption, String)
Loads the serialized data from the storage item and deserializes the object.
Declaration
public static async Task<T> LoadAsync<T>(string identifier, IStorage storage, SaveSystemJsonSerializer serializer, bool useEncryption, ISaveSystemEncryption encryption, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
| SaveSystemJsonSerializer | serializer | The serializer |
| System.Boolean | useEncryption | |
| ISaveSystemEncryption | encryption | |
| System.String | password |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | The deserialized object |
Type Parameters
| Name | Description |
|---|---|
| T |
LoadCatalogAsync()
Loads the storage catalog using the default settings.
Declaration
public static Task<List<string>> LoadCatalogAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<System.String>> | The catalog list |
LoadCatalogAsync(SaveSystemSettings)
Loads the storage catalog.
Declaration
public static Task<List<string>> LoadCatalogAsync(SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<System.String>> | The catalog list |
LoadCatalogAsync(IStorage)
Loads the storage catalog.
Declaration
public static Task<List<string>> LoadCatalogAsync(IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Collections.Generic.List<System.String>> | The catalog list |
LoadImageAsync(String)
Loads the texture from the image encoded data using the default settings.
Declaration
public static Task<Texture2D> LoadImageAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<UnityEngine.Texture2D> | The texture loaded from image data |
LoadImageAsync(String, SaveSystemSettings)
Loads the texture from the image encoded data.
Declaration
public static Task<Texture2D> LoadImageAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<UnityEngine.Texture2D> | The texture loaded from image data |
LoadImageAsync(String, IStorage)
Loads the texture from the image encoded data.
Declaration
public static async Task<Texture2D> LoadImageAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<UnityEngine.Texture2D> | The texture loaded from image data |
LoadIntoAsync(String, Object)
Loads the serialized data from the storage item and deserializes it into (populates) the object using the default settings.
Declaration
public static Task<object> LoadIntoAsync(string identifier, object target)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | target | The target object to load data into |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Object> | The populated target object |
LoadIntoAsync(String, Object, SaveSystemSettings)
Loads the serialized data from the storage item and deserializes it into (populates) the object.
Declaration
public static Task<object> LoadIntoAsync(string identifier, object target, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | target | The target object to load data into |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Object> | The populated target object |
LoadIntoAsync(String, Object, IStorage, SaveSystemJsonSerializer, Boolean, ISaveSystemEncryption, String)
Loads the serialized data from the storage item and deserializes it into (populates) the object.
Declaration
public static async Task<object> LoadIntoAsync(string identifier, object target, IStorage storage, SaveSystemJsonSerializer serializer, bool useEncryption, ISaveSystemEncryption encryption, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | target | The target object to load data into |
| IStorage | storage | The storage |
| SaveSystemJsonSerializer | serializer | The serializer |
| System.Boolean | useEncryption | |
| ISaveSystemEncryption | encryption | |
| System.String | password |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Object> | The populated target object |
LoadIntoAsync<T>(String, Object)
Loads the serialized data from the storage item and deserializes it into (populates) the object using the default settings.
Declaration
public static Task<T> LoadIntoAsync<T>(string identifier, object target)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | target | The target object to load data into |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | The populated target object |
Type Parameters
| Name | Description |
|---|---|
| T |
LoadIntoAsync<T>(String, Object, SaveSystemSettings)
Loads the serialized data from the storage item and deserializes it into (populates) the object.
Declaration
public static Task<T> LoadIntoAsync<T>(string identifier, object target, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | target | The target object to load data into |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | The populated target object |
Type Parameters
| Name | Description |
|---|---|
| T |
LoadIntoAsync<T>(String, Object, IStorage, SaveSystemJsonSerializer, Boolean, ISaveSystemEncryption, String)
Loads the serialized data from the storage item and deserializes it into (populates) the object.
Declaration
public static async Task<T> LoadIntoAsync<T>(string identifier, object target, IStorage storage, SaveSystemJsonSerializer serializer, bool useEncryption, ISaveSystemEncryption encryption, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | target | The target object to load data into |
| IStorage | storage | The storage |
| SaveSystemJsonSerializer | serializer | The serializer |
| System.Boolean | useEncryption | |
| ISaveSystemEncryption | encryption | |
| System.String | password |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<T> | The populated target object |
Type Parameters
| Name | Description |
|---|---|
| T |
LoadMetaDataAsync(String)
Loads the storage item meta data using the default settings.
Declaration
public static Task<StorageMetaData> LoadMetaDataAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageMetaData> | The storage item meta data |
LoadMetaDataAsync(String, SaveSystemSettings)
Loads the storage item meta data.
Declaration
public static Task<StorageMetaData> LoadMetaDataAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageMetaData> | The storage item meta data |
LoadMetaDataAsync(String, IStorage)
Loads the storage item meta data.
Declaration
public static Task<StorageMetaData> LoadMetaDataAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageMetaData> | The storage item meta data |
MoveAsync(String, String, Boolean)
Moves the storage item to a new location using the default settings.
Declaration
public static Task<StorageMoveOperationResult> MoveAsync(string fromIdentifier, string toIdentifier, bool replace)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fromIdentifier | The storage item source location |
| System.String | toIdentifier | The storage item destination location |
| System.Boolean | replace | Replace the destination item if exists |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageMoveOperationResult> | True if operation was successful otherwise false |
MoveAsync(String, String, Boolean, SaveSystemSettings)
Moves the storage item to a new location.
Declaration
public static Task<StorageMoveOperationResult> MoveAsync(string fromIdentifier, string toIdentifier, bool replace, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fromIdentifier | The storage item source location |
| System.String | toIdentifier | The storage item destination location |
| System.Boolean | replace | Replace the destination item if exists |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageMoveOperationResult> | True if operation was successful otherwise false |
MoveAsync(String, String, Boolean, IStorage)
Moves the storage item to a new location.
Declaration
public static Task<StorageMoveOperationResult> MoveAsync(string fromIdentifier, string toIdentifier, bool replace, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fromIdentifier | The storage item source location |
| System.String | toIdentifier | The storage item destination location |
| System.Boolean | replace | Replace the destination item if exists |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<StorageMoveOperationResult> | True if operation was successful otherwise false |
ReadAllBytesAsync(String)
Reads all the binary data from the storage item using the default settings.
Declaration
public static Task<byte[]> ReadAllBytesAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Byte[]> | The binary data |
ReadAllBytesAsync(String, SaveSystemSettings)
Reads all the binary data from the storage item.
Declaration
public static Task<byte[]> ReadAllBytesAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Byte[]> | The binary data |
ReadAllBytesAsync(String, IStorage)
Reads all the binary data from the storage item.
Declaration
public static Task<byte[]> ReadAllBytesAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Byte[]> | The binary data |
ReadAllTextAsync(String)
Reads all the text data from the storage item using the default settings.
Declaration
public static Task<string> ReadAllTextAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | The text data |
ReadAllTextAsync(String, SaveSystemSettings)
Reads all the text data from the storage item.
Declaration
public static Task<string> ReadAllTextAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | The text data |
ReadAllTextAsync(String, IStorage)
Reads all the text data from the storage item.
Declaration
public static Task<string> ReadAllTextAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | The text data |
RestoreBackupAsync(String, StorageBackup)
Restores the backup for the storage item using the default settings.
Declaration
public static Task<bool> RestoreBackupAsync(string identifier, StorageBackup backup)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| StorageBackup | backup | The backup to restore |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
RestoreBackupAsync(String, StorageBackup, SaveSystemSettings)
Restores the backup for the storage item.
Declaration
public static Task<bool> RestoreBackupAsync(string identifier, StorageBackup backup, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| StorageBackup | backup | The backup to restore |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
RestoreBackupAsync(String, StorageBackup, IStorage)
Restores the backup for the storage item.
Declaration
public static Task<bool> RestoreBackupAsync(string identifier, StorageBackup backup, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| StorageBackup | backup | The backup to restore |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
RestoreLatestBackupAsync(String)
Restores the latest backup for the storage item using the default settings.
Declaration
public static Task<bool> RestoreLatestBackupAsync(string identifier)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
RestoreLatestBackupAsync(String, SaveSystemSettings)
Restores the latest backup for the storage item.
Declaration
public static Task<bool> RestoreLatestBackupAsync(string identifier, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
RestoreLatestBackupAsync(String, IStorage)
Restores the latest backup for the storage item.
Declaration
public static Task<bool> RestoreLatestBackupAsync(string identifier, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if operation was successful otherwise false |
SaveAsync(String, Object)
Serializes the value and saves the serialized data at the specified storage item.
Declaration
public static Task SaveAsync(string identifier, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | value | The value |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveAsync(String, Object, SaveSystemSettings)
Serializes the value and saves the serialized data at the specified storage item.
Declaration
public static Task SaveAsync(string identifier, object value, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | value | The value |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveAsync(String, Object, IStorage, SaveSystemJsonSerializer, Boolean, ISaveSystemEncryption, String)
Serializes the value and saves the serialized data at the specified storage item.
Declaration
public static async Task SaveAsync(string identifier, object value, IStorage storage, SaveSystemJsonSerializer serializer, bool useEncryption, ISaveSystemEncryption encryption, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.Object | value | The value |
| IStorage | storage | The storage |
| SaveSystemJsonSerializer | serializer | The serializer |
| System.Boolean | useEncryption | |
| ISaveSystemEncryption | encryption | |
| System.String | password |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveCatalogAsync(List<String>)
Saves the storage catalog using the default settings.
Declaration
public static Task SaveCatalogAsync(List<string> catalog)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<System.String> | catalog | The catalog list |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveCatalogAsync(List<String>, SaveSystemSettings)
Saves the storage catalog.
Declaration
public static Task SaveCatalogAsync(List<string> catalog, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<System.String> | catalog | The catalog list |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveCatalogAsync(List<String>, IStorage)
Saves the storage catalog.
Declaration
public static Task SaveCatalogAsync(List<string> catalog, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.List<System.String> | catalog | The catalog list |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImageEXRAsync(String, Texture2D, Texture2D.EXRFlags)
Saves the texture by encoding it to EXR format using the default settings.
Declaration
public static Task SaveImageEXRAsync(string identifier, Texture2D image, Texture2D.EXRFlags flags)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| UnityEngine.Texture2D.EXRFlags | flags | The EXR flags |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImageEXRAsync(String, Texture2D, Texture2D.EXRFlags, SaveSystemSettings)
Saves the texture by encoding it to EXR format.
Declaration
public static Task SaveImageEXRAsync(string identifier, Texture2D image, Texture2D.EXRFlags flags, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| UnityEngine.Texture2D.EXRFlags | flags | The EXR flags |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImageEXRAsync(String, Texture2D, Texture2D.EXRFlags, IStorage)
Saves the texture by encoding it to EXR format.
Declaration
public static Task SaveImageEXRAsync(string identifier, Texture2D image, Texture2D.EXRFlags flags, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| UnityEngine.Texture2D.EXRFlags | flags | The EXR flags |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImageJPGAsync(String, Texture2D, Int32)
Saves the texture by encoding it to JPG format using the default settings.
Declaration
public static Task SaveImageJPGAsync(string identifier, Texture2D image, int quality)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| System.Int32 | quality | The quality |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImageJPGAsync(String, Texture2D, Int32, SaveSystemSettings)
Saves the texture by encoding it to JPG format.
Declaration
public static Task SaveImageJPGAsync(string identifier, Texture2D image, int quality, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| System.Int32 | quality | The quality |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImageJPGAsync(String, Texture2D, Int32, IStorage)
Saves the texture by encoding it to JPG format.
Declaration
public static Task SaveImageJPGAsync(string identifier, Texture2D image, int quality, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| System.Int32 | quality | The quality |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImagePNGAsync(String, Texture2D)
Saves the texture by encoding it to PNG format using the default settings.
Declaration
public static Task SaveImagePNGAsync(string identifier, Texture2D image)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImagePNGAsync(String, Texture2D, SaveSystemSettings)
Saves the texture by encoding it to PNG format.
Declaration
public static Task SaveImagePNGAsync(string identifier, Texture2D image, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveImagePNGAsync(String, Texture2D, IStorage)
Saves the texture by encoding it to PNG format.
Declaration
public static Task SaveImagePNGAsync(string identifier, Texture2D image, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| UnityEngine.Texture2D | image | The texture |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveMetaDataAsync(String, StorageMetaData)
Saves the storage item meta data using the default settings.
Declaration
public static Task SaveMetaDataAsync(string identifier, StorageMetaData metaData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | |
| StorageMetaData | metaData |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveMetaDataAsync(String, StorageMetaData, SaveSystemSettings)
Saves the storage item meta data.
Declaration
public static Task SaveMetaDataAsync(string identifier, StorageMetaData metaData, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | |
| StorageMetaData | metaData | |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
SaveMetaDataAsync(String, StorageMetaData, IStorage)
Saves the storage item meta data.
Declaration
public static Task SaveMetaDataAsync(string identifier, StorageMetaData metaData, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| StorageMetaData | metaData | The storage item meta data |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
WriteAllBytesAsync(String, Byte[])
Writes all the binary data in the storage item using the default settings.
Declaration
public static Task WriteAllBytesAsync(string identifier, byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item |
| System.Byte[] | data | The binary data |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
WriteAllBytesAsync(String, Byte[], SaveSystemSettings)
Writes all the binary data in the storage item.
Declaration
public static Task WriteAllBytesAsync(string identifier, byte[] data, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item |
| System.Byte[] | data | The binary data |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
WriteAllBytesAsync(String, Byte[], IStorage)
Writes all the binary data in the storage item.
Declaration
public static Task WriteAllBytesAsync(string identifier, byte[] data, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item |
| System.Byte[] | data | The binary data |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
WriteAllTextAsync(String, String)
Writes all the text data to the storage item using the default settings.
Declaration
public static Task WriteAllTextAsync(string identifier, string data)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.String | data | The text data |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
WriteAllTextAsync(String, String, SaveSystemSettings)
Writes all the text data to the storage item.
Declaration
public static Task WriteAllTextAsync(string identifier, string data, SaveSystemSettings settings)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.String | data | The text data |
| SaveSystemSettings | settings | The settings |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
WriteAllTextAsync(String, String, IStorage)
Writes all the text data to the storage item.
Declaration
public static Task WriteAllTextAsync(string identifier, string data, IStorage storage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | identifier | The storage item identifier |
| System.String | data | The text data |
| IStorage | storage | The storage |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Events
| Improve this Doc View SourceLoaded
Fires when loaded the data.
Declaration
public static event EventHandler<LoadEventArgs> Loaded
Event Type
| Type | Description |
|---|---|
| System.EventHandler<LoadEventArgs> |
LoadedInto
Fires when loaded into the object.
Declaration
public static event EventHandler<LoadIntoEventArgs> LoadedInto
Event Type
| Type | Description |
|---|---|
| System.EventHandler<LoadIntoEventArgs> |
Loading
Fires when begun loading the data.
Declaration
public static event EventHandler<LoadEventArgs> Loading
Event Type
| Type | Description |
|---|---|
| System.EventHandler<LoadEventArgs> |
LoadingInto
Fires when begun loading into the object.
Declaration
public static event EventHandler<LoadIntoEventArgs> LoadingInto
Event Type
| Type | Description |
|---|---|
| System.EventHandler<LoadIntoEventArgs> |
Saved
Fires when saved the data.
Declaration
public static event EventHandler<SaveEventArgs> Saved
Event Type
| Type | Description |
|---|---|
| System.EventHandler<SaveEventArgs> |
Saving
Fires when begun saving the data.
Declaration
public static event EventHandler<SaveEventArgs> Saving
Event Type
| Type | Description |
|---|---|
| System.EventHandler<SaveEventArgs> |