tools/VsIdeHostAdapter/TargetAddIn/AgentSide/VsIdeHostAdapter.cs
/// <summary>
/// Determine which registry hive to use:
///     If override value is set, use it, don't use anything else.
///     Else, If using RunConfig, get it from RunConfig
///     Else, get it from environment.
/// </summary>
/// <returns></returns>
Determine which registry hive to use:
If override value is set, use it, don't use anything else.
Else, If using RunConfig, get it from RunConfig
Else, get it from environment.
Determine which registry hive to use : If override value is set use it don ' t use anything else . Else If using RunConfig get it from RunConfig Else get it from environment .
private string GetRegistryHive()
        {
            string overrideHiveValue = RegistrySettings.RegistryHiveOverride;
            if (!string.IsNullOrEmpty(overrideHiveValue))
            {
                return overrideHiveValue;
            }
            TestRunConfiguration runConfig = m_runContext.RunConfig.TestRun.RunConfiguration;
            VsIdeHostRunConfigData runConfigHostData = runConfig.HostData[Name] as VsIdeHostRunConfigData;
            if (runConfigHostData != null)
            {
                return runConfigHostData.RegistryHive;
            }
            return null;    
        }
private string GetRegistryHive ( ) { string overrideHiveValue = RegistrySettings . RegistryHiveOverride ; if ( ! string . IsNullOrEmpty ( overrideHiveValue ) ) { return overrideHiveValue ; } TestRunConfiguration runConfig = m_runContext . RunConfig . TestRun . RunConfiguration ; VsIdeHostRunConfigData runConfigHostData = runConfig . HostData [ Name ] as VsIdeHostRunConfigData ; if ( runConfigHostData != null ) { return runConfigHostData . RegistryHive ; } return null ; }
Determine which registry hive to use:
If override value is set, use it, don't use anything else.
Determine which registry hive to use : If override value is set use it don ' t use anything else .
// We get registry hive each time we initialize host side, i.e. it can be changed in between tests. // Note that Run Config Data can be null, e.g. when executing using HostType attribute. // VsIde will figure out and use default.
None