Ejemplo n.º 1
0
        // Token: 0x0600011F RID: 287 RVA: 0x000039AC File Offset: 0x00001BAC
        public ListDvswitchsResp ListDvswitchs(string siteUri, ListDvswitchsReqEx reqEx)
        {
            ListDvswitchsResp listDvswitchsResp = new ListDvswitchsResp();
            StringBuilder     stringBuilder     = new StringBuilder(siteUri + "/dvswitchs?");

            if (null != reqEx)
            {
                stringBuilder.Append((reqEx.location == null) ? "" : ("location=" + reqEx.location + "&"));
                stringBuilder.Append((reqEx.name == null) ? "" : ("name=" + reqEx.name + "&"));
            }
            string text = RestClientUtil.sendRequest("GET", stringBuilder.ToString(0, stringBuilder.Length - 1), null, this.bean, "ListDvswitchs");

            CommonResource.log.Info("ListDvswitchs result : " + text);
            return(JsonConvert.DeserializeObject <ListDvswitchsResp>(text));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 查询DVSwitch列表
        /// </summary>    
        /// <example>
        /// <para>ListDvswitchsReqEx reqEx = new ListDvswitchsReqEx();</para>
        /// <para>ListDvswitchsResp resp = common.ListDvswitchs("/service/sites/4D9D0815", reqEx);</para>
        /// </example>
        /// <param name="siteUri">【必选】站点Uri</param>
        /// <param name="reqEx">【可选】请求相关参数</param>
        /// <returns>查询结果</returns>
        public ListDvswitchsResp ListDvswitchs(string siteUri, ListDvswitchsReqEx reqEx)
        {
            ListDvswitchsResp resp = new ListDvswitchsResp();

            StringBuilder url = new StringBuilder(siteUri + "/dvswitchs?");
            #region
            if (null != reqEx)
            {
                url.Append(null == reqEx.location ? "" : ("location=" + reqEx.location + "&"));
                url.Append(null == reqEx.name ? "" : ("name=" + reqEx.name + "&"));
            }
            #endregion
            string result = RestClientUtil.sendRequest("GET", url.ToString(0, url.Length - 1), null, bean, "ListDvswitchs");
            log.Info("ListDvswitchs result : " + result);

            resp = JsonConvert.DeserializeObject<ListDvswitchsResp>(result);

            return resp;
        }