IRunConfigurationCustomHostEditor.SetData Method

Persists host-specific data for this editor.

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

Syntax

'Declaration
Sub SetData ( _
    data As IHostSpecificRunConfigurationData _
)
void SetData(
    IHostSpecificRunConfigurationData data
)
void SetData(
    IHostSpecificRunConfigurationData^ data
)
abstract SetData : 
        data:IHostSpecificRunConfigurationData -> unit 
function SetData(
    data : IHostSpecificRunConfigurationData
)

Parameters

Remarks

Retrieve this data by using the GetData method.

Examples

/// <summary>
/// Called by the main editor to load the data into UI.
/// </summary>
/// <param name="data">host specific data</param>
void IRunConfigurationCustomHostEditor.SetData(IHostSpecificRunConfigurationData data)
{
    // Turn off the event handlers when loading data into UI.
    m_isLoading = true;
    try
    {
        m_config = (MyHostRunConfigData)data;
        m_envVarDataGridView.Rows.Clear();
        foreach (string name in m_config.EnvironmentVariables.Keys)
        {
            DataGridViewRow row = new DataGridViewRow();
            DataGridViewTextBoxCell cell1 = 
                new DataGridViewTextBoxCell();
            cell1.Value = name;
            DataGridViewTextBoxCell cell2 = 
                new DataGridViewTextBoxCell();
            cell2.Value = m_config.EnvironmentVariables[name];
            row.Cells.Add(cell1);
            row.Cells.Add(cell2);
            m_envVarDataGridView.Rows.Add(row);
        }
    }
    finally
    {
        m_isLoading = false;
    }
}

.NET Framework Security

See Also

Reference

IRunConfigurationCustomHostEditor Interface

Microsoft.VisualStudio.TestTools.Vsip Namespace

GetData

IHostSpecificRunConfigurationData