IRunConfigurationCustomHostEditor::SetData Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Persists host-specific data for this editor.

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

void SetData(
	IHostSpecificRunConfigurationData^ data
)

Retrieve this data by using the GetData method.

/// <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;
    }
}

Community Additions

Show: