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 Save( ) { bool saveOrUpdate = SaveOrUpdate( ); if ( saveOrUpdate ) { _original = new BaselinePasswordDocument( _passwordRepository.LoadPassword( Key ) ); UpdateMasterPasswordId( ); } return saveOrUpdate; }