コード例 #1
0
 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( );
 }
コード例 #2
0
        public bool Delete( )
        {
            if ( !CanDelete )
                return false;
            bool deleted = DeletePassword( );
            if ( !deleted )
                return false;

            _original = new NewPasswordDocument( );
            UpdateMasterPasswordId( );

            return true;
        }