private void BeforeAccessNotification(TokenCacheNotificationArgs args)
{
lock (@lock)
{
if (File.Exists(_cacheFilePath))
{
try
{
byte[] data = File.ReadAllBytes(_cacheFilePath);
byte[] state = ProtectedData.Unprotect(data, null, DataProtectionScope.CurrentUser);
this.Deserialize(state);
}
catch (Exception exception)
{
Git.Trace.WriteLine($"! {exception.Message}");
}
}
}
}