/// <summary>
        /// 查询App列表
        /// </summary>
        /// <param name="startAppName">起始App名称</param>
        /// <param name="limit">每次查询时返回的App数量</param>
        /// <returns></returns>
        public static DescribeAppListResult DescribeAppList(string startAppName, int?limit)
        {
            DescribeAppListResult response = null;
            var dic     = new DISIngestionClient();
            var request = new DescribeAppListRequest();

            if (!string.IsNullOrWhiteSpace(startAppName))
            {
                //从该App开始返回App列表,返回的App列表不包括此App名称
                request.StartAppName = startAppName;
            }

            //单次请求返回App列表的最大数量
            if (limit != null)
            {
                request.Limit = limit.Value;
            }
            else
            {
                request.Limit = 10;
            }

            response = dic.DescribeAppList(request);
            return(response);
        }
Exemple #2
0
        public DescribeAppListResult DescribeAppList(DescribeAppListRequest describeAppRequest)
        {
            ObsWebServiceRequest obsWebServiceRequest = new DISWebServiceRequest();
            IRequest             requestobs           = new DISDefaultRequest(obsWebServiceRequest, Constants.SERVICENAME)
            {
                HttpMethod = HttpMethodName.GET.ToString()
            };

            var resourcePath = ResourcePathBuilder.Standard()
                               .WithProjectId(_disConfig.GetProjectId())
                               .WithResource(new AppResource(null))
                               .Build();

            requestobs.ResourcePath = resourcePath;
            var results = this.Request <DescribeAppListResult>(describeAppRequest, requestobs);

            return(results);
        }
 /// <summary>
 ///  获取应用列表
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public async Task <DescribeAppListResponse> DescribeAppList(DescribeAppListRequest request)
 {
     return(await new DescribeAppListExecutor().Client(this).Execute <DescribeAppListResponse, DescribeAppListResult, DescribeAppListRequest>(request).ConfigureAwait(false));
 }
 /// <summary>
 ///  获取应用列表
 /// </summary>
 /// <param name="request">请求参数信息</param>
 /// <returns>请求结果信息</returns>
 public DescribeAppListResponse DescribeAppList(DescribeAppListRequest request)
 {
     return(new DescribeAppListExecutor().Client(this).Execute <DescribeAppListResponse, DescribeAppListResult, DescribeAppListRequest>(request));
 }