DataCommand.DeriveParameters Method (String, DataCommandType)
Derives the parameters that can be specified for a given command.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Public Function DeriveParameters ( _
command As String, _
commandType As DataCommandType _
) As IVsDataParameter()
public IVsDataParameter[] DeriveParameters(
string command,
DataCommandType commandType
)
public:
virtual array<IVsDataParameter^>^ DeriveParameters(
String^ command,
DataCommandType commandType
) sealed
abstract DeriveParameters :
command:string *
commandType:DataCommandType -> IVsDataParameter[]
override DeriveParameters :
command:string *
commandType:DataCommandType -> IVsDataParameter[]
public final function DeriveParameters(
command : String,
commandType : DataCommandType
) : IVsDataParameter[]
Parameters
command
Type: System.StringA command from which to derive parameters specific to a data source.
commandType
Type: Microsoft.VisualStudio.Data.Services.SupportEntities.DataCommandTypeThe type of the command that specifies how to interpret the contents of the command parameter. The command type could either be a value from the DataCommandType enumeration or a custom command type defined by a provider, which can be passed in by forcing a cast from an integer to the DataCommandType enumeration.
Return Value
Type: array<Microsoft.VisualStudio.Data.Services.SupportEntities.IVsDataParameter[]
An array of IVsDataParameter objects. Each object represents a parameter derived from the command.
Implements
IVsDataCommand.DeriveParameters(String, DataCommandType)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The command parameter is nulla null reference (Nothing in Visual Basic). |
Remarks
After the instances of the derived parameter objects are retrieved, the client owns them and can modify their values as needed. The client will then pass these values along with a command type set to Text and an appropriate time-out value to the Execute or the ExecuteWithoutResults method.
Note
Other exceptions that occur indicate that the parameter derivation failed for a provider-specified reason.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.