Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataSourceAttribute Class

 

Contains information that describes a data source for a Web performance test. This class cannot be inherited.

Namespace:   Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

System::Object
  System::Attribute
    Microsoft.VisualStudio.TestTools.WebTesting::DataSourceAttribute

[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true)]
public ref class DataSourceAttribute sealed : Attribute

NameDescription
System_CAPS_pubmethodDataSourceAttribute(String^, String^, DataBindingAccessMethod, String^)

Initializes an instance of the DataSourceAttribute class using a single table and the defined access method.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, DataBindingAccessMethod, array<String^>^)

Initializes an instance of the DataSourceAttribute class using an array of table names.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, String^)

Initializes an instance of the DataSourceAttribute class using a single table.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, String^, DataBindingAccessMethod, DataBindingSelectColumns, String^)

Initializes an instance of the DataSourceAttribute class using an array of table names, the defined access method, name of the data source, name of the provider, connection string, and the column filters.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, String^, DataBindingAccessMethod, DataBindingSelectColumns, array<String^>^)

Initializes an instance of the DataSourceAttribute class using an array of table names, the defined access method, name of the data source, name of the provider, connection string, and the column filters.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, String^, DataBindingAccessMethod, String^)

Initializes an instance of the DataSourceAttribute class using a single table, the defined access method, and the name of the data source provider.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, String^, DataBindingAccessMethod, array<String^>^)

Initializes an instance of the DataSourceAttribute class using an array of table names, the defined access method, and the name of the data source provider.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, String^, String^)

Initializes an instance of the DataSourceAttribute class using a single table and the name of the data source provider.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, String^, array<String^>^)

Initializes an instance of the DataSourceAttribute class using an array of table names and the name of the data source provider.

System_CAPS_pubmethodDataSourceAttribute(String^, String^, array<String^>^)

Initializes an instance of the DataSourceAttribute class.

NameDescription
System_CAPS_pubpropertyAccessMethod

Gets the method by which data will be accessed in the data source.

System_CAPS_pubpropertyConnectionString

Gets the connection for the data source.

System_CAPS_pubpropertyDataSourceName

Gets the name of the data source.

System_CAPS_pubpropertyDataSourceProviderName

Gets the name of the data source provider.

System_CAPS_pubpropertySelectColumns

Gets the column filters used for selecting the data.

System_CAPS_pubpropertyTableNames

Gets the table names in the data source that contains data to be accessed.

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object^)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

The data source cannot be changed based on input during a test because all the data is loaded and cached before the first test runs. To change data sources at run-time, you can implement your own data binding. Use ADO.NET or a StreamReader when you read from a file.

This attribute can be applied to classes. This attribute can be applied multiple times. For more information about how to use attributes, see Extending Metadata Using Attributes.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: