/// <summary> /// Logout the user. /// </summary> /// <returns>Whether the operation was a success</returns> public bool UserLogout() { SerializePersistentSettings(); _dict = new Dictionary <object, object>(); _pathHandler = new UsernameUserSettingsPathHandler(null); return(true); }
public UserSettings() { _dict = new Dictionary <object, object>(); //a usernameUserSettingsPathHandler with null username will fall back to username 'default' _pathHandler = new UsernameUserSettingsPathHandler(null); DeserializePersistentSettings(); }
/// <summary> /// Not necessarily where the user logs into the system. /// The purpose of this is to authenticate a user by their /// ID and to authenticate the application by its ID and then /// retrieve the appropriate settings. /// </summary> /// <param name="creds"></param> /// <returns></returns> public bool UserLogin(Credentials creds) { _dict = new Dictionary <object, object>(); _pathHandler = new UsernameUserSettingsPathHandler(creds.UserKey); DeserializePersistentSettings(); return(true); }