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