DataParameter Class
Represents a data parameter that is derived from a data source command, or that is passed with a command to a data source.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Data.Framework.DataParameter
Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetParameter
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
Public MustInherit Class DataParameter _
Implements IVsDataParameter, IVsDataParameterDescriptor
public abstract class DataParameter : IVsDataParameter,
IVsDataParameterDescriptor
public ref class DataParameter abstract : IVsDataParameter,
IVsDataParameterDescriptor
[<AbstractClass>]
type DataParameter =
class
interface IVsDataParameter
interface IVsDataParameterDescriptor
end
public abstract class DataParameter implements IVsDataParameter, IVsDataParameterDescriptor
The DataParameter type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DataParameter() | Initializes a new instance of the DataParameter class. | |
DataParameter(Boolean) | Initializes a new instance of the DataParameter class, specifying whether the instance was derived using the DeriveParameters method. |
Top
Properties
Name | Description | |
---|---|---|
DefaultSize | Gets an integer value specifying the default size for the current parameter type. | |
Descriptor | Gets information that describes the data parameter. | |
Direction | Gets or sets a DataParameterDirection object specifying the direction of the parameter. | |
HasDescriptor | Gets a value indicating whether the data parameter exposes its IVsDataParameterDescriptor implementation through the Descriptor property. | |
IsDerived | Gets a Boolean value that indicates whether the current parameter was derived from the data source. | |
IsFixedSize | Gets a Boolean value indicating whether the size for the current parameter type is fixed. | |
IsNullable | Gets a Boolean value indicating whether the current parameter can have a null value provided that it is derived. | |
IsOptional | Gets a Boolean value indicating whether the current parameter is optional, provided that it is derived. | |
Name | Gets or sets the string literal name of the current parameter. | |
Size | Gets or sets an integer value specifying the size of the parameter. | |
Type | Gets or sets the data source–specific type of the parameter. | |
Value | Gets or sets the value of the parameter. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetDirectionCore | Retrieves the parameter direction. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetIsNullableCore | Retrieves a Boolean value indicating whether the current parameter can be nulla null reference (Nothing in Visual Basic). | |
GetIsOptionalCore | Retrieves a Boolean value indicating whether the parameter is optional. | |
GetNameCore | Retrieves the name of the parameter. | |
GetSizeCore | Retrieves an integer value specifying the size of the parameter. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetTypeCore | Retrieves the data source–specific type of the parameter. | |
GetTypeFrom | Infers the data source–specific parameter type from a parameter value. | |
GetValueCore | Retrieves the value of a specified parameter. | |
IsSupportedDirection | Retrieves a Boolean value indicating whether the specified parameter direction is supported. | |
IsValidType | Retrieves a Boolean value indicating whether the specified data source–specific type is a valid type. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnDirectionChanged | Called when the Direction property is changed to signal a change in the parameter direction. | |
OnDirectionChanging | Called when the Direction property is about to change. | |
OnNameChanged | Called when the Name property has changed. | |
OnNameChanging | Called when the Name property is about to change. | |
OnSizeChanged | Called when the Size property has changed. | |
OnSizeChanging | Called when the Size property is about to change. | |
OnTypeChanged | Called when the Type property has changed. | |
OnTypeChanging | Called when the Type property is about to change. | |
OnValueChanged | Called when the Value property has changed. | |
OnValueChanging | Called when the Value property is about to change. | |
Parse | Disassembles a parameter value in a string format and converts the value to the correct type. | |
SetDirectionCore | Sets the direction of the parameter by using the DataParameterDirection enumeration. | |
SetNameCore | Sets the name of the parameter. | |
SetSizeCore | Sets an integer value specifying the size of the current parameter. | |
SetTypeCore | Sets the data type of the current parameter. | |
SetValueCore | Sets the value of the parameter. | |
ToString | Retrieves a string representation of the value of the current parameter. (Overrides Object.ToString().) | |
TryConvertValue | Attempts to convert the specified value to the specified type. |
Top
Fields
Name | Description | |
---|---|---|
NullSize | A public size constant holding the value of zero. |
Top
Remarks
This class uses an indirect mechanism for implementing parameter properties. Each property get method calls a virtual protected method that retrieves the property. Each property set method, however, calls three virtual protected methods: one indicating that the property is changing, another actually changing the property, and a third indicating that the property has changed.
This allows the property setter to isolate the handling of invalid input in the property changing method, set the property, and apply any side effects in the property changed method. This also allows the base class to provide some default error checking to match the semantics defined by the parameter interface.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.