Framework/Core/SVT/SubscriptionSecurityStatus.ps1
Set-StrictMode -Version Latest class SubscriptionSecurityStatus: SVTCommandBase { SubscriptionSecurityStatus([string] $subscriptionId, [InvocationInfo] $invocationContext): Base($subscriptionId, $invocationContext) { } hidden [SVTEventContext[]] RunAllControls() { [SVTEventContext[]] $result = @(); $svtClassName = [SVTMapping]::SubscriptionMapping.ClassName $svtObject = $null; try { $svtObject = New-Object -TypeName $svtClassName -ArgumentList $this.SubscriptionContext.SubscriptionId } catch { # Unwrapping the first layer of exception which is added by New-Object function $this.CommandError($_.Exception.InnerException.ErrorRecord); } if($svtObject) { $this.SetSVTBaseProperties($svtObject); $result += $svtObject.EvaluateAllControls(); } [ListenerHelper]::RegisterListeners(); return $result; } } |