protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListLabelSourceDetailsRequest request;

            try
            {
                request = new ListLabelSourceDetailsRequest
                {
                    NamespaceName     = NamespaceName,
                    LabelName         = LabelName,
                    Limit             = Limit,
                    Page              = Page,
                    SortOrder         = SortOrder,
                    LabelSourceSortBy = LabelSourceSortBy,
                    OpcRequestId      = OpcRequestId
                };
                IEnumerable <ListLabelSourceDetailsResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LabelSourceCollection, true);
                }
                if (!ParameterSetName.Equals(AllPageSet) && !ParameterSetName.Equals(LimitSet) && response.OpcNextPage != null)
                {
                    WriteWarning("This operation supports pagination and not all resources were returned. Re-run using the -All option to auto paginate and list all resources.");
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
예제 #2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListLabelSourceDetailsRequest request;

            try
            {
                request = new ListLabelSourceDetailsRequest
                {
                    NamespaceName     = NamespaceName,
                    LabelName         = LabelName,
                    Limit             = Limit,
                    Page              = Page,
                    SortOrder         = SortOrder,
                    LabelSourceSortBy = LabelSourceSortBy,
                    OpcRequestId      = OpcRequestId
                };
                IEnumerable <ListLabelSourceDetailsResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LabelSourceCollection, true);
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }