SonarLint.VisualStudio.Integration.UnitTests.ConfigurableVsMonitorSelection.SetContext C# (CSharp) Method

SetContext() public method

public SetContext ( System.Guid contextId, bool activate ) : void
contextId System.Guid
activate bool
return void
        public void SetContext(Guid contextId, bool activate)
        {
            uint cookie;

            var monitorSelection = (IVsMonitorSelection)this;
            Assert.IsTrue(ErrorHandler.Succeeded(monitorSelection.GetCmdUIContextCookie(ref contextId, out cookie)));
            Assert.IsTrue(ErrorHandler.Succeeded(monitorSelection.SetCmdUIContext(cookie, activate ? 1 : 0)));
        }