public void Reload( ) { PasswordDigestDocument passwordDigestDocument = _passwordRepository.LoadPassword( Key ); if ( passwordDigestDocument == null ) _original = new NewPasswordDocument( ); else { var update = !IsDirty; _original = new BaselinePasswordDocument( passwordDigestDocument ); if ( update ) UpdateFromOriginal( ); } UpdateMasterPasswordId( ); }
public bool Delete( ) { if ( !CanDelete ) return false; bool deleted = DeletePassword( ); if ( !deleted ) return false; _original = new NewPasswordDocument( ); UpdateMasterPasswordId( ); return true; }