GitScc.SccProviderService._windowEvents_WindowActivated C# (CSharp) Method

_windowEvents_WindowActivated() private method

private _windowEvents_WindowActivated ( Window GotFocus, Window LostFocus ) : void
GotFocus Window
LostFocus Window
return void
        private async void _windowEvents_WindowActivated(Window GotFocus, Window LostFocus)
        {

            try
            {
                if (GitSccOptions.Current.TrackActiveGitRepo)
                {
                    var filename = GotFocus?.Document?.FullName;
                    if (!string.IsNullOrWhiteSpace(filename))
                    {
                        //await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
                        //await TaskScheduler.Default;
                        RepositoryManager.Instance.GetTrackerForPath(filename, true);
                    }
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Error In Window Activated Event: " + ex.Message);
            }
        }
SccProviderService