IRunConfigurationCustomHostEditor Interface
Represents the required extensions to a user control for a custom editor in a host environment for editing test run configuration settings.
Namespace: Microsoft.VisualStudio.TestTools.Vsip
Assembly: Microsoft.VisualStudio.QualityTools.Vsip (in Microsoft.VisualStudio.QualityTools.Vsip.dll)
Syntax
声明
Public Interface IRunConfigurationCustomHostEditor _
Inherits IRunConfigurationEditor
public interface IRunConfigurationCustomHostEditor : IRunConfigurationEditor
public interface class IRunConfigurationCustomHostEditor : IRunConfigurationEditor
type IRunConfigurationCustomHostEditor =
interface
interface IRunConfigurationEditor
end
public interface IRunConfigurationCustomHostEditor extends IRunConfigurationEditor
The IRunConfigurationCustomHostEditor type exposes the following members.
Properties
Name | Description | |
---|---|---|
![]() |
Description | Gets the description of this configuration editor. (Inherited from IRunConfigurationEditor.) |
![]() |
HelpKeyword | Gets the Help keyword for this configuration editor. (Inherited from IRunConfigurationEditor.) |
![]() |
HostType | Gets the name of the host. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
GetData | Retrieves persisted host configuration data. |
![]() |
Initialize | Initializes this configuration editor by using objects from the testing framework. (Inherited from IRunConfigurationEditor.) |
![]() |
OnCommonDataDirty | Handles the event that occurs when common test run configuration data has been modified outside the editor. (Inherited from IRunConfigurationEditor.) |
![]() |
SetData | Persists host-specific data for this editor. |
![]() |
VerifyData | Verifies the data in the editor and prompts the user, if it is required. (Inherited from IRunConfigurationEditor.) |
Top
Events
Name | Description | |
---|---|---|
![]() |
DataGetDirty | The event that is raised by the editor when the data in the editor is changed by the user. (Inherited from IRunConfigurationEditor.) |
Top
Remarks
To display a new page in the test run configuration editor, implement the methods of the IRunConfigurationCustomHostEditor interface. The class that implements this interface must inherit from one of the user control classes:
This user control is displayed on the Hosts page in the test run configuration editor.
Your implementation of IRunConfigurationCustomHostEditor can be empty. This means that the implementations of all members other than the HostType property can be empty methods.
If your custom user control class contains user interface (UI) components, testers will see your user control when they take the following steps:
Open the Hosts page of the test run configuration editor.
In the Host type list, select a value that matches the value that is returned by the IRunConfigurationCustomHostEditor.HostType property.
For more information about the test run configuration editor, see How to: Configure Database Unit Test Execution.
Examples
For the complete code of the following example, see the MyHostAdapterRunConfigControl.cs file in the test extensibility sample in the Visual Studio SDK.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.VisualStudio.TestTools.Common;
using Microsoft.VisualStudio.TestTools.Vsip;
namespace Microsoft.VisualStudio.TestTools.Samples
{
/// <summary>
/// UI control for my host adapter configuration. This control
/// is Hosted inside the test run configuration editor and
/// contains a data grid view where a user can define the
/// environment variables.
/// </summary>
public partial class MyHostAdapterRunConfigControl
: UserControl, IRunConfigurationCustomHostEditor
{
/// See the MyHostAdapterRunConfigControl.cs file in
/// the test extensibility sample.
}
}
See Also
Reference
Microsoft.VisualStudio.TestTools.Vsip Namespace