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