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