/// <summary>
        /// returns the number of report schedules
        ///
        /// </summary>
        /// <param name="service">Instance of MarketplaceWebService service</param>
        /// <param name="request">GetReportScheduleCountRequest request</param>
        public static async Task InvokeGetReportScheduleCount(MarketplaceWebService service, GetReportScheduleCountRequest request)
        {
            try
            {
                GetReportScheduleCountResponse response = await service.GetReportScheduleCount(request);


                Console.WriteLine("Service Response");
                Console.WriteLine("=============================================================================");
                Console.WriteLine();

                Console.WriteLine("        GetReportScheduleCountResponse");
                if (response.IsSetGetReportScheduleCountResult())
                {
                    Console.WriteLine("            GetReportScheduleCountResult");
                    GetReportScheduleCountResult getReportScheduleCountResult = response.GetReportScheduleCountResult;
                    if (getReportScheduleCountResult.IsSetCount())
                    {
                        Console.WriteLine("                Count");
                        Console.WriteLine("                    {0}", getReportScheduleCountResult.Count);
                    }
                }
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }

                Console.WriteLine("            ResponseHeaderMetadata");
                Console.WriteLine("                RequestId");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.RequestId);
                Console.WriteLine("                ResponseContext");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.ResponseContext);
                Console.WriteLine("                Timestamp");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.Timestamp);
                Console.WriteLine("                Quota Max");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.QuotaMax);
                Console.WriteLine("                Quota Remaining");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.QuotaRemaining);
                Console.WriteLine("                Quota Resets On");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.QuotaResetsOn);
            }
            catch (MarketplaceWebServiceException ex)
            {
                Console.WriteLine("Caught Exception: " + ex.Message);
                Console.WriteLine("Response Status Code: " + ex.StatusCode);
                Console.WriteLine("Error Code: " + ex.ErrorCode);
                Console.WriteLine("Error Type: " + ex.ErrorType);
                Console.WriteLine("Request ID: " + ex.RequestId);
                Console.WriteLine("XML: " + ex.XML);
                Console.WriteLine("ResponseHeaderMetadata: " + ex.ResponseHeaderMetadata);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// returns the number of report schedules
        ///
        /// </summary>
        /// <param name="service">Instance of MarketplaceWebService service</param>
        /// <param name="request">GetReportScheduleCountRequest request</param>
        public static void InvokeGetReportScheduleCount(MarketplaceWebService service, GetReportScheduleCountRequest request)
        {
            try
            {
                GetReportScheduleCountResponse response = service.GetReportScheduleCount(request);


                Console.WriteLine("Service Response");
                Console.WriteLine("=============================================================================");
                Console.WriteLine();

                Console.WriteLine("        GetReportScheduleCountResponse");
                if (response.IsSetGetReportScheduleCountResult())
                {
                    Console.WriteLine("            GetReportScheduleCountResult");
                    GetReportScheduleCountResult getReportScheduleCountResult = response.GetReportScheduleCountResult;
                    if (getReportScheduleCountResult.IsSetCount())
                    {
                        Console.WriteLine("                Count");
                        Console.WriteLine("                    {0}", getReportScheduleCountResult.Count);
                    }
                }
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }
            }
            catch (MarketplaceWebServiceException ex)
            {
                Console.WriteLine("Caught Exception: " + ex.Message);
                Console.WriteLine("Response Status Code: " + ex.StatusCode);
                Console.WriteLine("Error Code: " + ex.ErrorCode);
                Console.WriteLine("Error Type: " + ex.ErrorType);
                Console.WriteLine("Request ID: " + ex.RequestId);
                Console.WriteLine("XML: " + ex.XML);
            }
        }