public static UserProfile LoadUserProfile(int userId) { string filePath = CacheClient.GenerateUserProfileFilePath(userId); var userProfile = CacheClient.ReadJsonObjectFile <UserProfile>(filePath); return(userProfile); }
/// <summary>Stores a user's profile in the cache.</summary> public static bool SaveUserProfile(UserProfile userProfile) { Debug.Assert(userProfile != null); string filePath = CacheClient.GenerateUserProfileFilePath(userProfile.id); return(IOUtilities.WriteJsonObjectFile(filePath, userProfile)); }
public static bool SaveUserProfile(UserProfile userProfile) { Debug.Assert(userProfile != null); string filePath = CacheClient.GenerateUserProfileFilePath(userProfile.id); return(LocalDataStorage.WriteJSONFile(filePath, userProfile)); }
public static void SaveUserProfile(UserProfile userProfile) { Debug.Assert(userProfile.id > 0, "[mod.io] Cannot cache a user profile without a user id"); string filePath = CacheClient.GenerateUserProfileFilePath(userProfile.id); CacheClient.WriteJsonObjectFile(filePath, userProfile); }
public static UserProfile LoadUserProfile(int userId) { string filePath = CacheClient.GenerateUserProfileFilePath(userId); UserProfile userProfile; LocalDataStorage.ReadJSONFile(filePath, out userProfile); return(userProfile); }
public static void DeleteUserProfile(int userId) { CacheClient.DeleteFile(CacheClient.GenerateUserProfileFilePath(userId)); }
/// <summary>Deletes a user's profile from the cache.</summary> public static bool DeleteUserProfile(int userId) { return(IOUtilities.DeleteFile(CacheClient.GenerateUserProfileFilePath(userId))); }
public static bool DeleteUserProfile(int userId) { string path = CacheClient.GenerateUserProfileFilePath(userId); return(LocalDataStorage.DeleteFile(path)); }