Microsoft.Alm.Authentication.VstsAdalTokenCache.BeforeAccessNotification C# (CSharp) Method

BeforeAccessNotification() private method

private BeforeAccessNotification ( TokenCacheNotificationArgs args ) : void
args TokenCacheNotificationArgs
return void
        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}");
                    }
                }
            }
        }