Class SignOutGeneration
Counts the sign-outs of a token provider, so a token requested before a sign-out is not kept after it: take a Snapshot() before requesting the token, and keep the token only when HasChanged(int) is false. The sign-out calls Increment().
public sealed class SignOutGeneration
- Inheritance
-
SignOutGeneration
- Inherited Members
Methods
HasChanged(int)
Gets a value indicating whether the user signed out since snapshot was taken.
public bool HasChanged(int snapshot)
Parameters
snapshotintA value returned by Snapshot().
Returns
Increment()
Records a sign-out.
public void Increment()
Snapshot()
Gets the current generation, to compare with HasChanged(int) once the token is received.
public int Snapshot()
Returns
- int
The current generation.