Represents the context in which data collection occurs.
Inheritance Hierarchy
Object
  Microsoft.VisualStudio.TestTools.Execution.DataCollectionContext
Namespace:  Microsoft.VisualStudio.TestTools.Execution
Assembly:  Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public Class DataCollectionContext
[SerializableAttribute]
public class DataCollectionContext
[SerializableAttribute]
public ref class DataCollectionContext
[<SerializableAttribute>]
type DataCollectionContext =  class end
public class DataCollectionContext
The DataCollectionContext type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .gif) | DataCollectionContext(SessionId) | Initializes a new instance of the DataCollectionContext class by using the provided session ID. | 
| .gif) | DataCollectionContext(SessionId, TestExecId) | Initializes a new instance of the DataCollectionContext class by using the provided session ID and test execution ID. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .gif) | HasTestCase | Gets a value that indicates whether an executing test case is associated with this context. | 
| .gif) | SessionId | Gets the SessionId for the session under which the data collection occurs. Will not be nulla null reference (Nothing in Visual Basic). | 
| .gif) | TestExecId | Gets a TestExecId that identifies the test execution under which the data collection occurs. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | Equals | Determines whether the specified DataCollectionContext matches the current DataCollectionContext. (Overrides Object.Equals(Object).) | 
| .gif) | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | 
| .gif) | GetHashCode | Serves as a hash function for a DataCollectionContext. (Overrides Object.GetHashCode.) | 
| .gif) | GetType | Gets the Type of the current instance. (Inherited from Object.) | 
| .gif) | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | 
| .gif) | ToString | Returns a string that represents the current object. (Inherited from Object.) | 
Top
Operators
| Name | Description | |
|---|---|---|
| .gif) .gif) | Equality | Returns a value that indicates whether two instances of DataCollectionContext match. | 
| .gif) .gif) | Inequality | Returns a value that indicates whether two instances of DataCollectionContext do not match. | 
Top
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.