DataSource Class

Defines a data source for a Web performance test.


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

public class DataSource : ICloneable

The DataSource type exposes the following members.

Public methodDataSourceInitializes a new instance of the DataSource class.

Public propertyConnectionGets the connection string that is used to connect to the data source. The format for the connection string is the same as for the ConnectionString property of the System.Data.OleDbConnection class.
Public propertyNameGets or sets the name for the data source that uniquely identifies the data source from other data sources in the Web performance test.
Public propertyProviderGets the provider-invariant name for this data source. Example: System.Data.OleDb.
Public propertyTablesA DataSourceTableCollection object that contains a DataSourceTable object for each table in the data source that can be used by the Web performance test.

Public methodCloneCreates a new instance of the data source.
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.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetConnection(String, String)Sets the provider and connection string for the data source.
Public methodSetConnection(String, String, String)Sets the provider and connection string and enables a different string that you can use as a display value.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Public fieldStatic memberCsvProviderSpecifies a .csv file as a data source for a Web performance test.
Public fieldStatic memberXmlProviderSpecifies an XML data source for a Web performance test.

When no data source is specified, System.Data.OleDb is used as the default data provider.

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

Community Additions