Поделиться через


ControllerContext Class

Represents the current context for a test controller.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.Execution.ControllerContext

Namespace:  Microsoft.VisualStudio.TestTools.Execution
Assembly:  Microsoft.VisualStudio.QualityTools.ExecutionCommon (in Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class ControllerContext
[SerializableAttribute]
public class ControllerContext
[SerializableAttribute]
public ref class ControllerContext
[<SerializableAttribute>]
type ControllerContext =  class end
public class ControllerContext

The ControllerContext type exposes the following members.

Constructors

  Name Description
Public method ControllerContext Initializes a new instance of the ControllerContext class by using the provided name, display name, and connection string.

Top

Properties

  Name Description
Public property ConnectionString Gets the name of the controller. This includes the port number. The set accessor is for internal use only.
Public property DisplayName Gets the display name for the controller. The set accessor is for internal use only.
Public property Name Gets the fully qualified name of the controller. The set accessor is for internal use only.

Top

Methods

  Name Description
Public methodStatic member CreateForLocalController Creates a new controller context that is initialized for a locally hosted controller.
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 a hash function for a particular type. (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 ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

Although public, this ControllerContext class is created internally by the testing framework and can be used in unit testing your custom diagnostic data adapter.

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.Execution Namespace

Other Resources

Creating a Diagnostic Data Adapter to Collect Custom Data or Affect a Test Machine