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.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

public abstract class DataParameter : IVsDataParameter, 
	IVsDataParameterDescriptor

The DataParameter type exposes the following members.

  NameDescription
Protected methodDataParameter()Initializes a new instance of the DataParameter class.
Protected methodDataParameter(Boolean)Initializes a new instance of the DataParameter class, specifying whether the instance was derived using the DeriveParameters method.
Top

  NameDescription
Protected propertyDefaultSizeGets an integer value specifying the default size for the current parameter type.
Public propertyDescriptorGets information that describes the data parameter.
Public propertyDirectionGets or sets a DataParameterDirection object specifying the direction of the parameter.
Protected propertyHasDescriptorGets a value indicating whether the data parameter exposes its IVsDataParameterDescriptor implementation through the Descriptor property.
Public propertyIsDerivedGets a Boolean value that indicates whether the current parameter was derived from the data source.
Protected propertyIsFixedSizeGets a Boolean value indicating whether the size for the current parameter type is fixed.
Public propertyIsNullableGets a Boolean value indicating whether the current parameter can have a null value provided that it is derived.
Public propertyIsOptionalGets a Boolean value indicating whether the current parameter is optional, provided that it is derived.
Public propertyNameGets or sets the string literal name of the current parameter.
Public propertySizeGets or sets an integer value specifying the size of the parameter.
Public propertyTypeGets or sets the data source–specific type of the parameter.
Public propertyValueGets or sets the value of the parameter.
Top

  NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetDirectionCoreRetrieves the parameter direction.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetIsNullableCoreRetrieves a Boolean value indicating whether the current parameter can be null.
Protected methodGetIsOptionalCoreRetrieves a Boolean value indicating whether the parameter is optional.
Protected methodGetNameCoreRetrieves the name of the parameter.
Protected methodGetSizeCoreRetrieves an integer value specifying the size of the parameter.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetTypeCoreRetrieves the data source–specific type of the parameter.
Protected methodGetTypeFromInfers the data source–specific parameter type from a parameter value.
Protected methodGetValueCoreRetrieves the value of a specified parameter.
Protected methodIsSupportedDirectionRetrieves a Boolean value indicating whether the specified parameter direction is supported.
Protected methodIsValidTypeRetrieves a Boolean value indicating whether the specified data source–specific type is a valid type.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnDirectionChangedCalled when the Direction property is changed to signal a change in the parameter direction.
Protected methodOnDirectionChangingCalled when the Direction property is about to change.
Protected methodOnNameChangedCalled when the Name property has changed.
Protected methodOnNameChangingCalled when the Name property is about to change.
Protected methodOnSizeChangedCalled when the Size property has changed.
Protected methodOnSizeChangingCalled when the Size property is about to change.
Protected methodOnTypeChangedCalled when the Type property has changed.
Protected methodOnTypeChangingCalled when the Type property is about to change.
Protected methodOnValueChangedCalled when the Value property has changed.
Protected methodOnValueChangingCalled when the Value property is about to change.
Public methodParseDisassembles a parameter value in a string format and converts the value to the correct type.
Protected methodSetDirectionCoreSets the direction of the parameter by using the DataParameterDirection enumeration.
Protected methodSetNameCoreSets the name of the parameter.
Protected methodSetSizeCoreSets an integer value specifying the size of the current parameter.
Protected methodSetTypeCoreSets the data type of the current parameter.
Protected methodSetValueCoreSets the value of the parameter.
Public methodToStringRetrieves a string representation of the value of the current parameter. (Overrides Object.ToString().)
Protected methodTryConvertValueAttempts to convert the specified value to the specified type.
Top

  NameDescription
Public fieldStatic memberNullSizeA public size constant holding the value of zero.
Top

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft