DataSource Class

Defines a data source for a Web performance test.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.TestTools.WebTesting.DataSource

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

Syntax

'Declaration
<SerializableAttribute> _
Public Class DataSource _
    Implements ICloneable
[SerializableAttribute]
public class DataSource : ICloneable
[SerializableAttribute]
public ref class DataSource : ICloneable
[<SerializableAttribute>]
type DataSource =  
    class 
        interface ICloneable 
    end
public class DataSource implements ICloneable

The DataSource type exposes the following members.

Constructors

  Name Description
Public method DataSource Initializes a new instance of the DataSource class.

Top

Properties

  Name Description
Public property Connection Gets 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 property Name Gets or sets the name for the data source that uniquely identifies the data source from other data sources in the Web performance test.
Public property Provider Gets the provider-invariant name for this data source. Example: System.Data.OleDb.
Public property Tables A DataSourceTableCollection object that contains a DataSourceTable object for each table in the data source that can be used by the Web performance test.

Top

Methods

  Name Description
Public method Clone Creates a new instance of the data source.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method SetConnection(String, String) Sets the provider and connection string for the data source.
Public method SetConnection(String, String, String) Sets the provider and connection string and enables a different string that you can use as a display value.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member CsvProvider Specifies a .csv file as a data source for a Web performance test.
Public fieldStatic member XmlProvider Specifies an XML data source for a Web performance test.

Top

Remarks

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

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.

See Also

Reference

Microsoft.VisualStudio.TestTools.WebTesting Namespace