Exemple #1
0
 /// <summary>
 /// Delete a remote file.
 /// </summary>
 /// <param name="fileWithExt">The file name with extension.</param>
 /// <returns>A task upon completion.</returns>
 public static async Task Delete(string fileWithExt)
 {
     await OneDriveDataSource.Delete(fileWithExt);
 }
Exemple #2
0
 /// <summary>
 /// Get the contents of a file as a string.
 /// </summary>
 /// <param name="fileWithExt">The file name with extension.</param>
 /// <returns>A task with the file contents as a string.</returns>
 public static async Task <string> Retrieve(string fileWithExt)
 {
     return(await OneDriveDataSource.Retrieve(fileWithExt));
 }
Exemple #3
0
 /// <summary>
 /// Update the contents of a remote file.
 /// </summary>
 /// <typeparam name="T">The type of object to store in the file.</typeparam>
 /// <param name="fileWithExt">The name of the file with extension.</param>
 /// <param name="fileContents">The object to store in the file.</param>
 /// <returns>A task upon completion.</returns>
 public static async Task Update <T>(string fileWithExt, T fileContents)
 {
     await OneDriveDataSource.Update(fileWithExt, fileContents);
 }
Exemple #4
0
 /// <inheritdoc />
 public async Task Sync()
 {
     _syncData = await OneDriveDataSource.Retrieve <IDictionary <string, object> >(_fileWithExtension);
 }