source/TestCommon/source/FunctionApp.TestCommon/FunctionAppHost/FunctionAppHostManager.cs
/// <summary>
/// Only restarts the Function App if merging the existing process environment variables
/// with incoming environment variables results in any changes.
/// The merge will add new key/value pairs and update existing keys if their value differs from the incoming.
/// </summary>
Only restarts the Function App if merging the existing process environment variables
with incoming environment variables results in any changes.
The merge will add new key/value pairs and update existing keys if their value differs from the incoming.
Only restarts the Function App if merging the existing process environment variables with incoming environment variables results in any changes . The merge will add new key / value pairs and update existing keys if their value differs from the incoming .
public void RestartHostIfChanges(IEnumerable<KeyValuePair<string, string>> environmentVariables)
        {
            if (environmentVariables == null)
            {
                throw new ArgumentNullException(nameof(environmentVariables));
            }
            var hasChanges = MergeDictionaries(Settings.ProcessEnvironmentVariables, environmentVariables);
            if (hasChanges)
            {
                StopHost();
                StartHost();
            }
        }
public void RestartHostIfChanges ( IEnumerable < KeyValuePair < string , string > > environmentVariables ) { if ( environmentVariables == null ) { throw new ArgumentNullException ( nameof ( environmentVariables ) ) ; } var hasChanges = MergeDictionaries ( Settings . ProcessEnvironmentVariables , environmentVariables ) ; if ( hasChanges ) { StopHost ( ) ; StartHost ( ) ; } }
Only restarts the Function App if merging the existing process environment variables
with incoming environment variables results in any changes.
Only restarts the Function App if merging the existing process environment variables with incoming environment variables results in any changes .
environmentVariables
IEnumerable<KeyValuePair<string, string>>