Esempio n. 1
0
        private void HandleOutput(GetNetworkAddressListRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

            switch (ParameterSetName)
            {
            case LifecycleStateParamSet:
                response = client.Waiters.ForNetworkAddressList(request, waiterConfig, WaitForLifecycleState).Execute();
                break;

            case Default:
                response = client.GetNetworkAddressList(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, response.NetworkAddressList);
        }
Esempio n. 2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            GetNetworkAddressListRequest request;

            try
            {
                request = new GetNetworkAddressListRequest
                {
                    NetworkAddressListId = NetworkAddressListId,
                    OpcRequestId         = OpcRequestId
                };

                HandleOutput(request);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }