Exemplo n.º 1
0
        private void StartTracking()
        {
            // don't track again if already tracking
            if (IsTracking)
            {
                return;
            }

            // don't do anything if user explicitly disables source control integration
            if (_vsSettings != null &&
                SourceControlUtility.IsSourceControlDisabled(_vsSettings))
            {
                return;
            }

            NuGetUIThreadHelper.JoinableTaskFactory.Run(async() =>
            {
                await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

                uint cookie;
                if (ProjectTracker.AdviseTrackProjectDocumentsEvents(_projectDocumentListener, out cookie) == VSConstants.S_OK)
                {
                    _trackingCookie = cookie;
                }
            });
        }
Exemplo n.º 2
0
        private void StartTracking()
        {
            // don't track again if already tracking
            if (IsTracking)
            {
                return;
            }

            // don't do anything if user explicitly disables source control integration
            if (_vsSettings != null && SourceControlUtility.IsSourceControlDisabled(_vsSettings))
            {
                return;
            }

            uint cookie;

            _projectTracker.AdviseTrackProjectDocumentsEvents(_projectDocumentListener, out cookie);
            _trackingCookie = cookie;
        }