GitScc.SccProviderService.BranchUIClickedAsync C# (CSharp) Method

BranchUIClickedAsync() public method

public BranchUIClickedAsync ( ISccUIClickedEventArgs args, CancellationToken cancellationToken ) : System.Threading.Tasks.Task
args ISccUIClickedEventArgs
cancellationToken CancellationToken
return System.Threading.Tasks.Task
        public async Task BranchUIClickedAsync(ISccUIClickedEventArgs args, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            Debug.Assert(args != null, "Branch UI coordinates were not received.");

            IVsUIShell uiShell = (IVsUIShell)_sccProvider.GetService(typeof(SVsUIShell));
            if (uiShell != null)
            {
                POINTS[] p = new POINTS[1];
                p[0] = new POINTS();
                p[0].x = (short)args.ClickedElementPosition.TopRight.X;
                p[0].y = (short)args.ClickedElementPosition.TopRight.Y;

                Guid commandSet = GuidList.guidSccProviderCmdSet;
                await _statusBarManager.RefreshBranches();
                uiShell.ShowContextMenu(0, ref commandSet, PackageIds.BranchMenu, p, _statusBarManager);
            }
        }
SccProviderService