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