Tp.Integration.Ide.VisualStudio.Connect.DoQueryStatus C# (CSharp) Method

DoQueryStatus() private method

private DoQueryStatus ( string commandName, vsCommandStatusTextWanted neededText ) : vsCommandStatus
commandName string
neededText vsCommandStatusTextWanted
return vsCommandStatus
		private vsCommandStatus DoQueryStatus(string commandName, vsCommandStatusTextWanted neededText)
		{
			if (neededText == vsCommandStatusTextWanted.vsCommandStatusTextWantedNone)
			{
				if (commandName == _addIn.ProgID + "." + CmdLogin)
				{
					return _controller.Connected
							? vsCommandStatus.vsCommandStatusSupported
							: vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
				}
				if (commandName == _addIn.ProgID + "." + CmdLogout)
				{
					return _controller.Connected
							? vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled
							: vsCommandStatus.vsCommandStatusSupported;
				}
				return vsCommandStatus.vsCommandStatusSupported | vsCommandStatus.vsCommandStatusEnabled;
			}
			return vsCommandStatus.vsCommandStatusSupported;
		}