void IDualityBackend.Shutdown() { if (sharedPrefs != null) { ((IPreferencesBackend)this).Commit(); sharedPrefs.Dispose(); sharedPrefs = null; } }
public void ResetUserID(object sender, EventArgs e) { App.GetUser = String.Empty; App.userID = String.Empty; ISharedPreferences pref = GetSharedPreferences("MEI_UserPreferences", FileCreationMode.Private); ISharedPreferencesEditor editor = pref.Edit(); editor.PutString("MEI_UserID", String.Empty); editor.PutString("MEI_AllDomainData", String.Empty); editor.PutString("MEI_UserData", String.Empty); editor.Clear(); editor.Apply(); pref.Dispose(); }
public void Save() { //Commit changes and dispose if (_editor != null) { _editor.Commit(); _editor.Dispose(); _editor = null; } if (_preferences != null) { _preferences.Dispose(); _preferences = null; } }
public void Dispose() { _pref?.Dispose(); _editor?.Dispose(); }
public new void Dispose( ) { base.Dispose( ); localStateDatabase.Dispose( ); }