Class SettingsStorageExtensions

Inheritance
System.Object
SettingsStorageExtensions
Namespace: Catalog.Helpers
Assembly: Catalog.dll
Syntax
public static class SettingsStorageExtensions

Methods

IsRoamingStorageAvailable(ApplicationData)

Declaration
public static bool IsRoamingStorageAvailable(this ApplicationData appData)
Parameters
Type Name Description
Windows.Storage.ApplicationData appData
Returns
Type Description
System.Boolean

ReadAsync<T>(ApplicationDataContainer, String)

Declaration
public static async Task<T> ReadAsync<T>(this ApplicationDataContainer settings, string key)
Parameters
Type Name Description
Windows.Storage.ApplicationDataContainer settings
System.String key
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T

ReadAsync<T>(StorageFolder, String)

Declaration
public static async Task<T> ReadAsync<T>(this StorageFolder folder, string name)
Parameters
Type Name Description
Windows.Storage.StorageFolder folder
System.String name
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T

ReadBytesAsync(StorageFile)

Declaration
public static async Task<byte[]> ReadBytesAsync(this StorageFile file)
Parameters
Type Name Description
Windows.Storage.StorageFile file
Returns
Type Description
System.Threading.Tasks.Task<System.Byte[]>

ReadFileAsync(StorageFolder, String)

Declaration
public static async Task<byte[]> ReadFileAsync(this StorageFolder folder, string fileName)
Parameters
Type Name Description
Windows.Storage.StorageFolder folder
System.String fileName
Returns
Type Description
System.Threading.Tasks.Task<System.Byte[]>

SaveAsync<T>(ApplicationDataContainer, String, T)

Declaration
public static async Task SaveAsync<T>(this ApplicationDataContainer settings, string key, T value)
Parameters
Type Name Description
Windows.Storage.ApplicationDataContainer settings
System.String key
T value
Returns
Type Description
System.Threading.Tasks.Task
Type Parameters
Name Description
T

SaveAsync<T>(StorageFolder, String, T)

Declaration
public static async Task SaveAsync<T>(this StorageFolder folder, string name, T content)
Parameters
Type Name Description
Windows.Storage.StorageFolder folder
System.String name
T content
Returns
Type Description
System.Threading.Tasks.Task
Type Parameters
Name Description
T

SaveFileAsync(StorageFolder, Byte[], String, CreationCollisionOption)

Declaration
public static async Task<StorageFile> SaveFileAsync(this StorageFolder folder, byte[] content, string fileName, CreationCollisionOption options = CreationCollisionOption.ReplaceExisting)
Parameters
Type Name Description
Windows.Storage.StorageFolder folder
System.Byte[] content
System.String fileName
Windows.Storage.CreationCollisionOption options
Returns
Type Description
System.Threading.Tasks.Task<Windows.Storage.StorageFile>

SaveString(ApplicationDataContainer, String, String)

Declaration
public static void SaveString(this ApplicationDataContainer settings, string key, string value)
Parameters
Type Name Description
Windows.Storage.ApplicationDataContainer settings
System.String key
System.String value