Compartir a través de


IVsParseCommandLine Interface

Parses command line arguments for implementers of IOleCommandTarget. You can get an instance of the interface from the SVsParseCommandLine (SID_SVsParseCommandLine) service.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
<InterfaceTypeAttribute()> _
<GuidAttribute("366704D5-85D0-4F7D-B267-90FA4DD37D5B")> _
Public Interface IVsParseCommandLine
[InterfaceTypeAttribute()]
[GuidAttribute("366704D5-85D0-4F7D-B267-90FA4DD37D5B")]
public interface IVsParseCommandLine
[InterfaceTypeAttribute()]
[GuidAttribute(L"366704D5-85D0-4F7D-B267-90FA4DD37D5B")]
public interface class IVsParseCommandLine
[<InterfaceTypeAttribute()>]
[<GuidAttribute("366704D5-85D0-4F7D-B267-90FA4DD37D5B")>]
type IVsParseCommandLine =  interface end
public interface IVsParseCommandLine

The IVsParseCommandLine type exposes the following members.

Methods

  Name Description
Public method EvaluateSwitches Evaluates command line switches based on switch definitions.
Public method GetACParam Retrieves an auto completion command line item.
Public method GetCommand Gets the current command.
Public method GetCommandTail Returns the tail of the command line—characters remaining after the defined switches and arguments.
Public method GetParam Returns a parameter by index.
Public method GetParamCount Gets the number of command line parameters.
Public method GetRawSwitch Returns a raw, unparsed switch by index.
Public method GetRawSwitchValue Returns the raw, unparsed value of the switch by index.
Public method GetSwitchCount Returns the number of switches in the command line.
Public method GetSwitchValue Gets the parsed value of a switch by index.
Public method GetSwitchValueCount Gets the number of switch values on the command line.
Public method HasParams Queries whether or not there are command line parameters.
Public method HasSwitches Queries whether or not there are command line switches.
Public method HasSwitchValues Queries whether or not there are command line switch values.
Public method IsSwitchPresent Queries, by index, whether or not a given switch is present.
Public method ParseCommandLine Parses the command line as preparation for using other interface methods to retrieve the parsed elements.
Public method ParseCommandTail Parses the tail of the command line.
Public method QuoteParam Quote a parameter string and escape characters within the string appropriately.
Public method RejectAllSwitches Tests for whether or not there were any switches.
Public method SwitchHasValue Tests, by index, whether or not a specific switch has a value.
Public method ValidateParamCount Verify the parameter count is within a specific range.

Top

Remarks

Use the ParseCommandLine method to parse the command line. You can then use the other interface methods to retrieve switches, values, and parameters.

For more information about IOleCommandTarget see TN071: MFC IOleCommandTarget Implementation.

COM Signature

From vsshell.idl:

See Also

Reference

Microsoft.VisualStudio.Shell.Interop Namespace