private void HandleOutput(GetDeployStageRequest request) { var waiterConfig = new WaiterConfiguration { MaxAttempts = MaxWaitAttempts, GetNextDelayInSeconds = (_) => WaitIntervalSeconds }; switch (ParameterSetName) { case LifecycleStateParamSet: response = client.Waiters.ForDeployStage(request, waiterConfig, WaitForLifecycleState).Execute(); break; case Default: response = client.GetDeployStage(request).GetAwaiter().GetResult(); break; } WriteOutput(response, response.DeployStage); }
protected override void ProcessRecord() { base.ProcessRecord(); GetDeployStageRequest request; try { request = new GetDeployStageRequest { DeployStageId = DeployStageId, OpcRequestId = OpcRequestId }; HandleOutput(request); FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }