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
'宣告
Sub SetData ( _
data As IHostSpecificRunConfigurationData _
)
void SetData(
IHostSpecificRunConfigurationData data
)
void SetData(
IHostSpecificRunConfigurationData^ data
)
abstract SetData :
data:IHostSpecificRunConfigurationData -> unit
function SetData(
data : IHostSpecificRunConfigurationData
)
Parameters
- data
Type: Microsoft.VisualStudio.TestTools.Common.IHostSpecificRunConfigurationData
A IHostSpecificRunConfigurationData object that contains the data to be persisted.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
IRunConfigurationCustomHostEditor Interface