Export (0) Print
Expand All

DataSourceAttribute Class

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

Namespace: Microsoft.VisualStudio.TestTools.WebTesting
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in microsoft.visualstudio.qualitytools.webtestframework.dll)

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=true)] 
public sealed class DataSourceAttribute : Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=true) */ 
public final class DataSourceAttribute extends Attribute
AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple=true) 
public final class DataSourceAttribute extends Attribute

NoteNote

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 reading 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.

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

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

ADD
Show:
© 2014 Microsoft