共用方式為


IVsParseCommandLine Interface

Definition

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

public interface class IVsParseCommandLine
public interface class IVsParseCommandLine
__interface IVsParseCommandLine
[System.Runtime.InteropServices.Guid("366704D5-85D0-4F7D-B267-90FA4DD37D5B")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsParseCommandLine
[System.Runtime.InteropServices.Guid("366704D5-85D0-4F7D-B267-90FA4DD37D5B")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsParseCommandLine
[<System.Runtime.InteropServices.Guid("366704D5-85D0-4F7D-B267-90FA4DD37D5B")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsParseCommandLine = interface
[<System.Runtime.InteropServices.Guid("366704D5-85D0-4F7D-B267-90FA4DD37D5B")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsParseCommandLine = interface
Public Interface IVsParseCommandLine
Attributes

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:

Methods

EvaluateSwitches(String)

Evaluates command line switches based on switch definitions.

GetACParam(Int32, Int32, Int32, String)

Retrieves an auto completion command line item.

GetCommand(String)

Gets the current command.

GetCommandTail(String)

Returns the tail of the command line—characters remaining after the defined switches and arguments.

GetParam(Int32, String)

Returns a parameter by index.

GetParamCount(Int32)

Gets the number of command line parameters.

GetRawSwitch(Int32, String)

Returns a raw, unparsed switch by index.

GetRawSwitchValue(Int32, String)

Returns the raw, unparsed value of the switch by index.

GetSwitchCount(Int32)

Returns the number of switches in the command line.

GetSwitchValue(Int32, String)

Gets the parsed value of a switch by index.

GetSwitchValueCount(Int32)

Gets the number of switch values on the command line.

HasParams()

Queries whether or not there are command line parameters.

HasSwitches()

Queries whether or not there are command line switches.

HasSwitchValues()

Queries whether or not there are command line switch values.

IsSwitchPresent(Int32)

Queries, by index, whether or not a given switch is present.

ParseCommandLine(String, Int32, Int32)

Parses the command line as preparation for using other interface methods to retrieve the parsed elements.

ParseCommandTail(String, Int32)

Parses the tail of the command line.

QuoteParam(String, String)

Quote a parameter string and escape characters within the string appropriately.

RejectAllSwitches()

Tests for whether or not there were any switches.

SwitchHasValue(Int32)

Tests, by index, whether or not a specific switch has a value.

ValidateParamCount(Int32, Int32)

Verify the parameter count is within a specific range.

Applies to