src/K4W.KinectVOD.Client.WinStore/LocalStorage/LocalStorageHelper.cs
/// <summary>
/// Save content to a local file
/// </summary>
/// <typeparam name="T">Content Type</typeparam>
/// <param name="fileName">Requested filename</param>
/// <param name="content">Content to save</param>
Save content to a local file
Save content to a local file
public static async Task SaveFileContentAsync<T>(string fileName, T content)
        {
            StorageFile localFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(fileName, CreationCollisionOption.ReplaceExisting);
            await FileIO.WriteTextAsync(localFile, content.SerializeToJson());
        }
public static async Task SaveFileContentAsync < T > ( string fileName , T content ) { StorageFile localFile = await ApplicationData . Current . LocalFolder . CreateFileAsync ( fileName , CreationCollisionOption . ReplaceExisting ) ; await FileIO . WriteTextAsync ( localFile , content . SerializeToJson ( ) ) ; }
Save content to a local file
Save content to a local file
fileName
string
None
content
T
Content to save
Content to save
typeparam
None