PrivateFunctions/Validate-Context.ps1

Function Validate-Context 
{
  [CmdletBinding()]
  Param()

  If (-not(Get-Variable -Name "DqContext" -ValueOnly -Scope "Script" -ErrorAction SilentlyContinue))
  {
    Write-Error "Geen actieve context gevonden voor DQ Monitor. Gebruik het commando 'Set-DqContext' om een nieuwe context aan te maken."
    Return;
  }
}