private/CreateConfigurationForNewContext.ps1
function CreateConfigurationForNewContext { param( [string] $buildFile, [string] $framework ) $previousConfig = GetCurrentConfigurationOrDefault $config = new-object psobject -property @{ buildFileName = $previousConfig.buildFileName; framework = $previousConfig.framework; taskNameFormat = $previousConfig.taskNameFormat; verboseError = $previousConfig.verboseError; coloredOutput = $previousConfig.coloredOutput; modules = $previousConfig.modules; moduleScope = $previousConfig.moduleScope; } if ($framework) { $config.framework = $framework; } if ($buildFile) { $config.buildFileName = $buildFile; } return $config } |