Beispiel #1
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListParserFunctionsRequest request;

            try
            {
                request = new ListParserFunctionsRequest
                {
                    NamespaceName = NamespaceName,
                    ParserName    = ParserName,
                    Limit         = Limit,
                    Page          = Page,
                    SortBy        = SortBy,
                    SortOrder     = SortOrder,
                    OpcRequestId  = OpcRequestId
                };
                IEnumerable <ListParserFunctionsResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LogAnalyticsParserFunctionCollection, 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();
            ListParserFunctionsRequest request;

            try
            {
                request = new ListParserFunctionsRequest
                {
                    NamespaceName = NamespaceName,
                    ParserName    = ParserName,
                    Limit         = Limit,
                    Page          = Page,
                    SortBy        = SortBy,
                    SortOrder     = SortOrder,
                    OpcRequestId  = OpcRequestId
                };
                IEnumerable <ListParserFunctionsResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.LogAnalyticsParserFunctionCollection, true);
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }