Class SessionPasswordMemory
- Namespace
- Archiver.App.Core
- Assembly
- Archiver.App.Core.dll
T-F200: the Archive Browser remembers a password that worked for an archive, so previewing a second file, drilling into a nested archive or extracting again does not ask again. Held in memory for the browse session only: cleared when another archive is opened, when browsing ends and when the window closes; never written anywhere.
public sealed class SessionPasswordMemory
- Inheritance
-
SessionPasswordMemory
- Inherited Members
Methods
Clear()
Forgets every password.
public void Clear()
Complete(string, ArchiveResult)
Ends the operation Wrap(string, Func<PasswordPromptInfo, Task<PasswordDecision>>) started: a password the result did not reject is
remembered for archivePath; a rejected one is forgotten.
public void Complete(string archivePath, ArchiveResult result)
Parameters
archivePathstringresultArchiveResult
WasPasswordRejected(ArchiveResult)
True when the result reports a missing or wrong password.
public static bool WasPasswordRejected(ArchiveResult result)
Parameters
resultArchiveResult
Returns
Wrap(string, Func<PasswordPromptInfo, Task<PasswordDecision>>)
Wraps prompt for one operation on archivePath: the
first attempt gets the remembered password without a prompt; a rejected one is forgotten
and the user is asked.
public Func<PasswordPromptInfo, Task<PasswordDecision>> Wrap(string archivePath, Func<PasswordPromptInfo, Task<PasswordDecision>> prompt)
Parameters
archivePathstringpromptFunc<PasswordPromptInfo, Task<PasswordDecision>>