protected override void ProcessRecord() { base.ProcessRecord(); ListTermsRequest request; try { request = new ListTermsRequest { CatalogId = CatalogId, GlossaryKey = GlossaryKey, DisplayName = DisplayName, DisplayNameContains = DisplayNameContains, LifecycleState = LifecycleState, ParentTermKey = ParentTermKey, IsAllowedToHaveChildTerms = IsAllowedToHaveChildTerms, WorkflowStatus = WorkflowStatus, Path = Path, Fields = Fields, SortBy = SortBy, SortOrder = SortOrder, Limit = Limit, Page = Page, OpcRequestId = OpcRequestId }; IEnumerable <ListTermsResponse> responses = GetRequestDelegate().Invoke(request); foreach (var item in responses) { response = item; WriteOutput(response, response.TermCollection, 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); } }
protected override void ProcessRecord() { base.ProcessRecord(); ListTermsRequest request; try { request = new ListTermsRequest { CatalogId = CatalogId, GlossaryKey = GlossaryKey, DisplayName = DisplayName, DisplayNameContains = DisplayNameContains, LifecycleState = LifecycleState, ParentTermKey = ParentTermKey, IsAllowedToHaveChildTerms = IsAllowedToHaveChildTerms, WorkflowStatus = WorkflowStatus, Path = Path, Fields = Fields, SortBy = SortBy, SortOrder = SortOrder, Limit = Limit, Page = Page, OpcRequestId = OpcRequestId }; IEnumerable <ListTermsResponse> responses = GetRequestDelegate().Invoke(request); foreach (var item in responses) { response = item; WriteOutput(response, response.TermCollection, true); } FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }